When creating a custom HTTP callback action, babelforce enables you to send variables (events) to an external application (like Google or Geckoboard). It's up to you to select which of these data sets (buckets) you need and which data points your application should be processing.
Depending on the event you create, babelforce will return a certain set of values that you can use in your external application.
All you have to do is select the bucket that contains the information you want to have.
In the screenshot to your right you see the available buckets:
- Call
- SMS
- Agent
- Queue
At the end of the article you find a print-out of the values each bucket contains; we selected three events for demonstrating how the content of the bucket varies.
However, let's now look at a couple of use cases to make this less theoretical:
First example:
Whenever you receive an inbound call, you would like to know the number of the caller and the time it was created.
In this case, you use the variables
- call.from
- call.dateCreated (UNIX timestamp)
To see which variables are available in the Call bucket on the event "Inbound Call", see the table here. There are no other buckets available for this event.
Second example:
Whenever there is a call successfully connected to a call (bridged), you want to know which agent took the call and in which queue the call waited. Also, you want to know the call wait time before it was picked up.
In this case, you use the variables
- agent.name
- queue.name
- call.duration
To see which variables are available in the Call, Agent and Queue bucket on "Call bridged", see the table here.
Third example:
For every received SMS you want to see who sent the SMS to which of your numbers.
In this case, you use the variables
- sms.from
- sms.to
To see which variables are available in the SMS bucket on the event "SMS received", see the table here. There are no other buckets available for this event.
Creating customized variables that are not included in the default buckets
There are scenarios where you might need other data points than those that are send with the buckets by default. Take for instance agent presence and the group an agent is in. Both data points are not send with the default agent bucket on call bridged.
If you want to do reporting on these fields, you need to add so called "Key-Values".
How they are processed depends on the web app you are using. Please see the examples provided in help center or contact support for more details.
Bucket on Inbound Call
Call (bucket) | Variable |
id | call.id |
parentId | call.parentId |
sessionId | call.sessionId |
conversationId | call.conversationId |
dateCreated | call.dateCreated |
dateEstablished | call.dateEstablished |
dateFinished | call.dateFinished |
lastUpdated | call.lastUpdated |
state | call.state |
finishReason | call.finishReason |
from | call.from |
to | call.to |
type | call.type |
source | call.source |
domain | call.domain |
duration | call.duration |
anonymous | call.anonymous |
recordings | call.recordings |
Bucket on Call Bridged
Call (bucket) | Variable |
id | call.id |
parentId | call.parentId |
sessionId | call.sessionId |
conversationId | call.conversationId |
dateCreated | call.dateCreated |
dateEstablished | call.dateEstablished |
dateFinished | call.dateFinished |
lastUpdated | call.lastUpdated |
state | call.state |
finishReason | call.finishReason |
from | call.from |
to | call.to |
type | call.type |
source | call.source |
domain | call.domain |
duration | call.duration |
anonymous | call.anonymous |
recordings | call.recordings |
bridged | call.bridged |
id | call.bridged.id |
name | call.bridged.name |
number | call.bridged.number |
queueId | call.bridged.queueId |
queueName |
call.bridged.queueName
|
agent | call.agent |
id | call.agent.id |
name | call.agent.name |
number | call.agent.number |
queue | call.queue |
id | call.queue.id |
name | call.queue.name |
Agent (bucket) | |
id | agent.id |
sourceId | agent.sourceId |
dateCreated | agent.dateCreated |
lastUpdated | agent.lastUpdated |
name | agent.name |
enabled | agent.enabled |
state | agent.state |
number | agent.number |
Queue (bucket) | |
id | queue.id |
dateCreated | queue.dateCreated |
lastUpdated | queue.lastUpdated |
enabled | queue.enabled |
defaultRingTimeout |
queue.defaultRingTimeout
|
wrapUpTime | queue.wrapUpTime |
name | queue.name |
maxDialCount | queue.maxDialCount |
dialOrder | queue.dialOrder |
dialOrderTimePeriod |
queue.dialOrderTimePeriod
|
maxSize | queue.maxSize |
size | queue.size |
stats | queue.stats |
active | queue.stats.active |
bridged | queue.stats.bridged |
queued | queue.stats.queued |
Bucket on SMS received
SMS (bucket) | Variable |
id | sms.id |
dateCreated | sms.dateCreated |
type | sms.type |
from | sms.from |
to | sms.to |
state | sms.state |
source | sms.source |
text | sms.text |
conversationId | sms.conversationId |
Beeceptor
A nice way to test the data that is sent via buckets and key-values is the tool beeceptor. Give it a try!