Customize Images with the Service Chat SDK
You can specify custom images used throughout the UI.
Use the setImage method on the SCAppearanceConfiguration object to replace a stock image with your image. Use the enumeration value for the image you intend to replace.
Supported image file formats include: tiff, tif, jpg, jpeg, gif, png, bmp, BMPF, ico, cur.
For specific images, use the SCSAppearanceImageToken enumeration specified by the SDK and add it to the SCAppearanceConfiguration object with the setImage method.
Image Description | Enum Value |
---|---|
Close button | close |
Done button | done |
Small warning icon used when an error occurs | error |
Error image used in a view for timeouts, when no agents are available, or for an unknown error | genericError |
Minimize button (Knowledge and Chat) | minimizeButton |
No connection | noConnection |
Send button (Case Publisher and Chat) | send |
Next field button (Case Publisher and Chat) | submitButtonNextArrow |
Previous field button (Case Publisher and Chat) | submitButtonPreviousArrow |
Attachment button when the user can attach a file | attachmentClipIcon |
Avatar used for the agent (only the inscribed circle is visible in the chat feed) | chatAgentAvatar |
Avatar used for Einstein bot (only the inscribed circle is visible in the chat feed) | chatBotAvatar |
Icon used for Einstein bot persistent footer menu | chatBotFooterMenu |
Icon used in the pre-chat screen | preChatIcon |
In Swift:
// Create appearance configuration instance
let config = SCAppearanceConfiguration()
// Specify images
config.setImage(MY_CUSTOM_IMAGE,
compatibleWithTraitCollection: MY_TRAITS,
forName: ENUM_VALUE)
// Add other customizations here...
// Save configuration instance
ServiceCloud.shared().appearanceConfiguration = config
In Objective-C:
// Create appearance configuration instance
SCAppearanceConfiguration *config = [SCAppearanceConfiguration new];
// Specify images
[config setImage:MY_CUSTOM_IMAGE compatibleWithTraitCollection: MY_TRAITS
forName: ENUM_VALUE];
// Add other customizations here...
// Save configuration instance
[SCServiceCloud sharedInstance].appearanceConfiguration = config;