HSBeaconContactForm

@interface HSBeaconContactForm : NSObject

A model object representing a new conversation. Values set on this are prepopulated in the new conversation contact form.

  • The customer email. This will be ignored if secure mode is used or if the customer has previously sent a message through the Beacon SDK. Unlike the email set in the login method, this value will be editable for the customer.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *_Nonnull email;
  • The customer name. This will be ignored if the user has previously sent a message through the Beacon SDK. Unlike the name set in the login method, this value will be editable for the customer.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *name;
  • The message subject

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *subject;
  • The body text for the email.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *text;
  • Read only dictionary of the custom fields ids and values set on this object

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        NSDictionary<NSNumber *, NSString *> *_Nonnull customFields;
  • Read only array of the files attached to this object.

    Declaration

    Objective-C

    @property (readonly, atomic)
        NSArray<id<HSBeaconContactFormAttachment>> *_Nonnull attachments;
  • Adds a new attachment to this object. There is a maximum of 3 attachments allowed. Any calls after the first 3 will be ignored and the method will return NO.

    Declaration

    Objective-C

    - (BOOL)addAttachment:(nonnull NSString *)filename data:(nonnull NSData *)data;
  • Adds a prefilled custom field value to the form.

    For dropdown fields, set this to the id of the value you want to select.

    For date fields, use yyyy-MM-dd style.

    Declaration

    Objective-C

    - (void)addCustomFieldValue:(nonnull NSString *)value forId:(int)fieldId;