The methods described below are used to perform actions inside the widget, or to obtain information from the widget. The ObjectinstanceId from the started event should be stored to be used later in other APIs.

MethodReturn ValueDescriptionExample
startInteraction(objectId:string, objectName:string None Starts an Interaction with a given objectId and name. webselfservice.startInteraction("51ad9318f7a431cd1f0c6ee6",
"myInteraction");
next(instanceId:string) None Clicks the Next button on the tab belonging to a given instanceId. After Next is clicked, the callback function is called. function performNext() {
        webselfservice.next(instanceid);
back(instanceId:string) None Clicks the Back button on the tab belonging to a given instanceId. After Back is clicked, the callback function is called. function performBack() {
        webselfservice.back(instanceid);

The following example shows shows how to start a particular Interaction when a certain button is clicked:

<body>

<button onclick="doNext();">Next</button>
<button onclick="doStart();">Start</button>
</body>
<script>
function doStart() {
pm({
target: document.getElementById('frame').contentWindow,
type: "start",
data: {id: designerId }
});
}
</script>

Revision:

Comments