Skip to main content
Version: 6.1

Custom Requests

Scope

This page helps you to start using the Integration API functionality in order to send requests to the b+s Connects, by providing examples and ideas.

info

For more information please refer to the documentation of the Integration API.

Limitations

For web clients the Integration API supports requests to b+s Connects only. The subscription to events is not supported.

Dispatch a Request

To send a request to the b+s Connects gadget a custom event of type integrationapi needs to be dispatched to the top window.

window.top.dispatchEvent( new CustomEvent('integrationapi', {detail: { [DATA] }} ))

[DATA] needs to be replaced by the parameters outlined in the Integration API documentation.

info

In single session environments CIClickToAct can be used instead of integrationapi. But it is not recommended in multi session environments, because the requests could be blocked by Microsoft Dynamics.

Examples

Create a new session

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'createSession',
templateName: 'cnx_integration_api'
}
})
);

Send dtmf

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'sendDtmf',
dtmf: '1234567890'
}
})
);

Set agent state to NOT_READY

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'setAgentState',
channelId: 'voice_5075',
state: 'NotReady',
reasonCode: '1'
}
})
);

Set wrapup reason

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'setWrapupReason',
channelId: 'voice',
workitemId: '12345',
wrapUpReason: 'Documentation'
}
})
);

Single Step Conference

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'singleStepConference',
channelId: 'voice_5075',
address: '123456'
}
})
);

Start an outbound or consultation call

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
value: '123456',
entityLogicalName: 'contact',
entityId: '84238a06-14f7-eb11-94ee-0022489'
}
})
);

Transfer a call

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'directTransfer',
channelId: 'voice_5075',
address: '123456'
}
})
);

Update workitem data

A description of the request can be found here.

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'updateWorkitemData',
channelId: 'voice',
workitemId: '12345',
updatedData: {
'callVariable1': '12345',
'user.eccVar1': '999999',
'wrapUpReason': 'Documentation'
}
}
})
);

Write a log message

window.top.dispatchEvent(
new CustomEvent('integrationapi', {
detail: {
request: 'writeLog',
logMessage: 'Example debug message',
logLevel: 'Debug'
}
})
);