SCSPrechatPickerObject
@interface SCSPrechatPickerObject : SCSPrechatObject
An SCSPrechatPickerObject
specifies a pre-chat picker field that is
displayed before a chat session is initiated.
Use the SCSPrechatPickerObject.required
property to specify whether this
field must have an option selected before initiating a session.
To send data directly to the agent without user input, see SCSPrechatObject
.
This object must be added to your chat configuration using
SCSChatConfiguration.prechatFields
.
-
Determines if the field must have an option before the pre-chat form can be submitted.
Declaration
Objective-C
@property (nonatomic, getter=isRequired) BOOL required;
Swift
var isRequired: Bool { get set }
-
An array of
SCSPrechatPickerOption
for the user to select from in the pre-chat form.Declaration
Objective-C
@property (nonatomic, copy, readonly) NSArray<SCSPrechatPickerOption *> *options;
Swift
var options: [SCSPrechatPickerOption]! { get }
-
Instantiates an
SCSPrechatPickerObject
object for use withSCSChatConfiguration.prechatFields
. This object will be displayed in the pre-chat window for the user to select a value.Declaration
Objective-C
- (instancetype)initWithLabel:(NSString *)label options:(NSArray<SCSPrechatPickerOption *> *)options;
Swift
init!(label: String!, options: [SCSPrechatPickerOption]!)
Parameters
label
The identifying label to show to the agent in the Service Console.
options
An array of
SCSPrechatPickerOption
for the user to select from in the pre-chat form.Return Value
The
SCSPrechatPickerObject
instance.