Created callback was not listed

I'm a developer trying to integrate schedule callback feature using NodeJS sample code,

require('dotenv').config()
const platformClient = require('purecloud-platform-client-v2');

const id = process.env.GENESYS_CLOUD_CLIENT_ID;
const secret = process.env.GENESYS_CLOUD_CLIENT_SECRET;

// Set Genesys Cloud objects
const client = platformClient.ApiClient.instance;
const conversationsApi = new platformClient.ConversationsApi();

// Set Genesys Cloud settings
client.setEnvironment('mypurecloud.jp');
client.setPersistSettings(true, 'test');

// Authenticate with Genesys Cloud
client.loginClientCredentialsGrant(GENESYS_CLOUD_CLIENT_ID, GENESYS_CLOUD_CLIENT_SECRET)
.then(() => {
console.log('Logged in');

  const callbackData = {
  	routingData: {
  		queueId: 'myqueueid'
  	},
  	scriptId: null,
  	callbackUserName: 'Tutorial Callback',
  	callbackNumbers: [
  		'3172222222'
  	],
  	data:{
  		customDataAttribute: 'custom value'
  	}
  };

  return conversationsApi.postConversationsCallbacks(callbackData);

})
.then((res) => {
console.log('callback created: ', res);
})
.catch((err) => console.error(err));

I got a response like this,

{ conversation:   { id: '<id>',    selfUri: '/api/v2/conversations/<id>' },    callbackIdentifiers:     [ { type: 'EXTERNAL', id: '<id>' },    { type: 'ACD', id: '<id>' } ] }

But created callback wasn't listed under the scheduled callback page, I logged in as master admin,
https://apps.mypurecloud.jp/directory/#/engage/admin/scheduledCallbacks

Why it doesn't list created callbacks in my page? Or any other settings or permission required to show in the page?

Please help.

Hi JS,

If you are getting a 200 back and a response body that would indicate the call thinks it successfully completed. If you think this is an error, then I would suggest you open a ticket with our Care team so that the engineers who own the callback service can investigate. You can open a ticket here.

Thanks,
John Carnell
Manager, Developer Engagement

When you create a callback, you can request the callback:

  • to be submitted immediately
  • to be scheduled for a future time (if callbackScheduledTime attribute is set in the request with a future date/time).

You can see another example with callbackScheduledTime here.

If you do not set the callbackScheduledTime attribute, this will request an immediate callback.

What it means is that if you request a Scheduled callback (for future time), a callback conversation will be created in the Genesys Cloud org, with the callback communication/session being in a "scheduled" state.
While the callback is in scheduled state, you can see it in the "Perfomance - Scheduled Callbacks" page.

When the date/time, specified in the callbackScheduledTime, is reached, the callback conversation changes its state (to "connected") and starts waiting for a Contact Center Agent, logged in the queue, to become available.
At this stage, when the callback conversation is actively waiting in the ACD Queue, it disappears from the "Perfomance - Scheduled Callbacks" page.
You can view the active/waiting callbacks using the "Performance - Queues Activity", possibly with a filter on callback media.

When a Contact Center Agent becomes available, the callback conversation is distributed to this agent (who can accept or reject it).
The agent will then be able to intiate a call to the callback number.

So, in your case, as the callbackScheduledTime attribute is not set in your request, this will trigger an immediate callback.
You won't see the callback in the "Perfomance - Scheduled Callbacks" page because the callback is already actively waiting in the ACD Queue.
You should see it using the "Performance - Queues Activity" page - https://apps.mypurecloud.jp/directory/#/analytics/queues/activity?mediaType=callback

Otherwise you can add a callbackScheduledTime attribute to your request (GMT/UTC Time - ISO-8601 formatted - e.g. 2016-09-26T15:30:00.000Z).

As a side note, if you do not want to specify a scriptId, just do not add the scriptId attribute in the request. It is better than using null value.

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.