Skip to main content

Integration

Getting started

Embedding

UCS Operator application can be embedded into another application via iframe.

<iframe width="320" height="450" id="ucs-operator-frame" src="https://ucs.example.cz/operator/"></iframe>

Communication

The parent application (e.g., CRM) can interact with UCS Operator via FE API that uses postMessage.

SDK

It's recommended to use prepared SDK that communicates via mentioned postMessage under the hood.

const ucsOperator = new UcsOperatorSDK(
// iframe element id
document.getElementById('ucs-operator-frame'),

// target origin
'https://ucs.example.cz',

// configuration
{},
)

Read more about the configuration parameter.

Login

First, it's necessary to log the user in. For the sake of simplicity, let's call login method with username and password. It's not recommended in the production, though, because it requires the parent application to know the user's password. Method called sso can be used instead or user can fill his credentials manually.

// dial phone number
ucsOperator.login('alice', 'password1234')