Please note that this SDK relates to LivePersons legacy chat product which receives limited support and will be deprecated in the future.

It is recommended to build future integrations on top of the corresponding messaging SDK instead.

Used to submit the Offline survey.

Request

Properties

Value Description Type Required
survey The survey answers as entered by the visitor. object Required

Structure:

{
    "survey": {
        "id": 1,
        "question": [
            {
                "id": 1,
                "value": "Need help fixing my car"
            },
            {
                "id": 2,
                "value": "me@me.com"
            }
        ]
    }
}

Sample code

var failedRequest = myChat.submitOfflineSurvey({
    survey: {
        id: 1,
        question: [
            {id: 1, value: "Need help fixing my car"},
            {id: 2, value: "me@me.com"}
        ]
    },
    success: myChat.offlineSurveySubmitted,
    error: myChat.offlineSubmitFailed,
    context: myChat
});

if (failedRequest && failedRequest.error) {
    alert(failedRequest.error);
}