Feedback form

VariableAfter the chat is initialized, the callbackSettings: UDCallbackSettings () parameter is filled in, which stores the feedback form settings (FF).

Example:

usedesk.callbackSettings

UDCallbackSettings Class

Parameters:

  • typeString: String - text of the FF opening type;
  • type: UDCallbackType - type of FOS opening. See below for a description of the UDCallbackType;
  • title: String - the title of the window;
  • greeting: String - text displayed in FF;
  • isRequiredTopic: Bool - obligatory filling of the topic;
  • titleTopics: String - topic title;
  • customFields: [UDCallbackCustomField] - list of additional fields;
  • checkedCustomFields: [UDCallbackCustomField] - list of additional fields enabled for display;
  • topics: [UDCallbackTopic] - list of topics;
  • checkedTopics: [UDCallbackTopic] - list of enabled topics for showing.


UDCallbackCustomField:

  • title: String - field name
  • text: String - field value
  • isRequired: Bool - required
  • isChecked: Bool - enabled or not
  • isValid: Bool - this parameter can store the validity of the value

UDCallbackTopic:

  • never - never show FF
  • check_working_times - show FF during non-working hours
  • always - always show only FF
  • always_and_chat - always show FF + Chat

UDCallbackType:

  • text: String - topic name
  • isChecked: Bool - enabled or not


Sending an offline form to the server:

Variable Type Description
Name String

Client name

Email String

Client mail

Message String Text of the message
Topic String Subject of the message
Fields UDCallbackCustomField Additional fields

Example:

usedesk.sendOfflineForm(name: "Name", email: "email@email.com", message: "Message",
topic: "Topic", fields: [UDCallbackCustomField(title: "Field1", text: "Value1"),
UDCallbackCustomField(title: "Field2", text: "Value22")]) { (result, error) in}

The block returns the following parameters:

Variable Type Description
Success Bool

Sending status

Error String Error type