SCSPrechatObject Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in SCSPrechatObject.h

Overview

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.

Properties

  label

Name of pre-chat detail shown to agent.

@property (nonatomic, strong, readonly) NSString *label

Declared In

SCSPrechatObject.h

  value

Value of the pre-chat detail.

@property (nonatomic, strong, readonly) NSString *value

Declared In

SCSPrechatObject.h

  displayLabel

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.

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

Discussion

Default: label value passed via initWithLabel:value:

Declared In

SCSPrechatObject.h

  transcriptFields

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.

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

Discussion

Default: Empty Array

Declared In

SCSPrechatObject.h

  displayToAgent

Indicates whether this pre-chat detail should be shown to agents accepting the chat session.

@property (nonatomic, assign) BOOL displayToAgent

Discussion

Default: YES

Declared In

SCSPrechatObject.h

Initialization

– initWithLabel:value:

Instantiates an SCSPrechatObject object for use with SCSChatConfiguration.prechatFields

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

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.

Declared In

SCSPrechatObject.h