KustomerOptions

KustomerOptions Class reference for Kustomer Chat iOS Core API .

Initialization options. Pass them to KustomerClient.configure(...) to override any settings within the SDK.v

If you don’t want to override any settings and use the default ones, you can skip creating this object. You can’t change these after calling KustomerClient.configure(...).

See Configuration.

public class KustomerOptions

activeAssistant

public var activeAssistant: ActiveAssistantOptions

Overrides the default chat assistant from your Kustomer website settings.

See changeActiveAssistant(ActiveAssistantOptions).

brandId

The brand id to use for you settings and Knowledge Base. If nil, uses your default brand.

public var brandId: String?

If you want to change this after configure(apiKey:options:launchOptions), use changeBrand(brandId: completion). Do not manually set Kustomer.options.brandId = "foo".

showAllBrandsConversationHistory

Show all conversations related to a customer across all of your brands. Defaults to false

public var showAllBrandsConversationHistory: Bool

businessScheduleId

The business schedule ID you want the app to use. Optional. If nil, uses your default business schedule from your Kustomer platform settings.

public var businessScheduleId: String?

If you want to change this after configure(apiKey:options:launchOptions), use changeBusinessSchedule(scheduleId: completion). Do not manually set Kustomer.options.businessScheduleId = "foo".

enableUI

Enables the Kustomer UI. Defaults to true. If you want to use any of the Kustomer UI this must be true. To build your own UI, set to false.

public var enableUI: Bool

hideNewConversationButton

public var hideNewConversationButton: Bool

Never show the "New Conversation" button. Default is false.

hideNewConversationButtonInClosedChat

public var hideNewConversationButtonInClosedChat: Bool

Defaults to false. If true, does not show a "Create new conversation" button on the detail screen for closed conversations.

hostDomain

Override the API host domain. Optional.

public var hostDomain: String?

hostViewController

public var hostViewController:UIViewController?

Specify the UIViewController from which the Kustomer UI will be presented. Defaults to the top-most view controller in your application.

Required if your app uses a UISceneDelegate, otherwise optional.

knowledgeBaseID

Deprecated. Use brandId instead.

The brand ID for the Knowledge Base you’d like to present. Optional.

public var knowledgeBaseID: String?

language

The language to display volume control, automated messages, snippets, and the knowledge base. If blank, uses the device’s language.

public var language: KustomerLanguage?

See Localization for a list of all KustomerLanguage.

messageAttachmentLocalCacheMaximumSizeInBytes

@KUSClamping
public var messageAttachmentLocalCacheMaximumSizeInBytes: Int { get set }

Max size of local cache for message attachments. Defaults to 25MB. Minimum of 10MB, maximum of Int.max. Files attached to support chats are saved to the documents folder. Once this local cache exceeds this value, it’s cleared the next time the customer downloads a new message attachment.

onDismiss

public var onDismiss: (()->Void)? = nil

Called when the close button is selected in the Kustomer UI or the modal has been swiped to dismiss.

onShow

public var onShow: (()->Void)?

Called when the Kustomer UI has been fully presented.

showAnimationFor5StarCSATRatings

Controls the chat animation displayed to customers for 5-star CSAT ratings.

Defaults to false. Set to true to turn on the CSAT animation.

Debugging and logs

debugMode

Enable debug mode. Adds several menus that you can show by shaking the phone.

public var debugMode: Bool

_debugAcceptLangHeader

public var _debugAcceptLangHeader: String?

logLevels

public var logLevels: [KustomerLogType]

An array of KustomerLogTypes you want to have printed to the console. Defaults to all KustomerLogTypes: [.debug, .info, .error, .warning]. KustomerLogType.fatal errors are always logged.

Push notifications

disablePush

public var disablePush: Bool

Do not use push notifications in your options. Push is automatically turned on when you configure push on the Kustomer app settings. Use this flag to disable.

Once a device registers for Kustomer push notifications, setting disablePush to true will not prevent pushes from being sent. This flag can only set whether or not the SDK registers this device for Kustomer push notifications.

pushBundleId

public var pushBundleId: String { get set }

Defaults to Bundle.main.bundleIdentifier. Push notifications will be registered and sent only to apps with this bundle ID.

pushEnvironment

public var pushEnvironment: PushEnvironment = .production

Must be set to .production. Defaults to .production.

If you want to use a push simulator with a real device, set this to .development, and use a JSON payload as described in the Push Notifications guide.

showInAppNotifications

public var showInAppNotifications: Bool

Show in-app notifications for new messages. Defaults to true.