SCSCasePublisherViewControllerDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | SCSCasePublisherViewController.h |
Overview
Delegate protocol used to receive events about the actions performed by the case publisher view controller.
– casePublisher:didSubmitWithResult:withCaseId:error:
Tells the delegate when the case is submitted. If the submission failed, this method passes the error to the delegate.
- (void)casePublisher:(SCSCasePublisherViewController *)publisher didSubmitWithResult:(SCSCasePublisherResult)result withCaseId:(nullable NSString *)caseId error:(nullable NSError *)error
Parameters
publisher |
Case publisher controller sending the message. |
---|---|
result |
Result of the user’s action. |
caseId |
ID of the created case if one was created, and if the ID can be determined. |
error |
Error returned, if any. |
Declared In
SCSCasePublisherViewController.h
– casePublisher:fieldsToHideFromCaseFields:
Allows the delegate to hide some of the case fields from showing in the Case Publisher.
- (NSSet<NSString*> *)casePublisher:(SCSCasePublisherViewController *)publisher fieldsToHideFromCaseFields:(NSArray<NSString*> *)availableFields
Parameters
publisher |
Case publisher controller sending the message. |
---|---|
availableFields |
List of fields in the Case Publisher layout. |
Return Value
Set of fields to be hidden in the Case Publisher.
Declared In
SCSCasePublisherViewController.h
– casePublisher:valuesForHiddenFields:
Allows the delegate to pass in the case field values while submitting the case.
- (NSDictionary<NSString*,id> *)casePublisher:(SCSCasePublisherViewController *)publisher valuesForHiddenFields:(NSSet<NSString*> *)hiddenFields
Parameters
publisher |
Case publisher controller sending the message. |
---|---|
hiddenFields |
Set of hidden fields in the Case Publisher. |
Return Value
NSDictionary
in which each entry maps the field name to the field value to be used during case submission.
Declared In
SCSCasePublisherViewController.h
– casePublisher:viewForResult:withCaseId:error:
Allows the delegate to supply a custom view to display to the user when the provided result is reached.
- (nullable UIView *)casePublisher:(SCSCasePublisherViewController *)publisher viewForResult:(SCSCasePublisherResult)result withCaseId:(nullable NSString *)caseId error:(nullable NSError *)error
Parameters
publisher |
Case publisher controller sending the message. |
---|---|
result |
Result of the case publisher. |
caseId |
ID of the created case if one was created, and if the ID can be determined. |
error |
Error returned, if any. |
Return Value
UIView instance configured for showing the result to the user, or nil
if the default should be used.
Discussion
If this method is not implemented, or the result is nil
, the case publisher will automatically provide a default value.
The returned view will be sized as needed to fit the available space on the case publisher.
Declared In
SCSCasePublisherViewController.h
– shouldEnableCaseDeflectionForPublisher:
Allows the delegate to disable the case deflection feature in the Case Publisher. By default the case deflection is enabled.
- (BOOL)shouldEnableCaseDeflectionForPublisher:(SCSCasePublisherViewController *)publisher
Parameters
publisher |
Case publisher controller sending the message. |
---|
Return Value
YES if the case publisher should display case deflection articles.
Declared In
SCSCasePublisherViewController.h
– casePublisher:fieldsForCaseDeflection:
Allows the delegate to specify the case fields for which case deflection articles are displayed.
- (NSSet<NSString*> *)casePublisher:(SCSCasePublisherViewController *)publisher fieldsForCaseDeflection:(NSArray<NSString*> *)availableFields
Parameters
publisher |
Case publisher controller sending the message. |
---|---|
availableFields |
List of editable text or textarea fields in the Case Publisher layout. |
Return Value
Set of fields to be used for forming case deflection searchterm.
Declared In
SCSCasePublisherViewController.h