SCSPrechatObject

@interface SCSPrechatObject : NSObject <NSCopying>

A SCSPrechatObject specifies a pre-chat field that you can send directly to the agent. This object contains a label and a value.

This object does not prompt the user for information. To create a field that the user can fill in, refer to SCSPrechatTextInputObject.

This object must be added to your chat configuration using SCSChatConfiguration.prechatFields.

  • Name of pre-chat detail shown to agent.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *_Nonnull label;

    Swift

    var label: String { get set }
  • Value of the pre-chat detail.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *_Nonnull value;

    Swift

    var value: String { get set }
  • Display name of the pre-chat detail shown on the mobile device to the end user. Only useful when used on child classes for text input or picker objects.

    Default: label value passed via -initWithLabel:value:

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *displayLabel;

    Swift

    var displayLabel: String? { get set }
  • Array of field identifiers on the LiveAgentChatTranscript object in salesforce. The value of this pre-chat detail will be placed in these fields on the salesforce object.

    Default: Empty Array

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nonnull)
        NSMutableArray<NSString *> *transcriptFields;

    Swift

    var transcriptFields: NSMutableArray { get set }
  • Indicates whether this pre-chat detail should be shown to agents accepting the chat session.

    Default: YES

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL displayToAgent;

    Swift

    var displayToAgent: Bool { get set }
  • Instantiates an SCSPrechatObject object for use with SCSChatConfiguration.prechatFields

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLabel:(nonnull NSString *)label
                                    value:(nullable NSString *)value;

    Swift

    init(label: String, value: String?)

    Parameters

    label

    The identifying label to show to the agent in the Service Console.

    value

    The value of the field.

    Return Value

    The SCSPrechatObject instance.

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;