@modea/capacitor-salesforce-chat
v1.6.0
Published
Capacitor plugin that launches salesforce chat ui
Readme
@modea/capacitor-salesforce-chat
Capacitor plugin that launches salesforce chat ui
Setup
cd ios && pod install && cd ..
Local Development
From the root of this repo run npm link.
Then, from the consuming library, run npm link @modea/capacitor-salesforce-chat.
Run npm run sync and then build the app to verify changes to the plugin.
Install
npm install @modea/capacitor-salesforce-chat
npx cap syncAPI
startChat(...)
startChat(options: SalesforceChatConfiguration) => Promise<{ success: boolean; }>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------- |
| options | SalesforceChatConfiguration |
Returns: Promise<{ success: boolean; }>
setBrandingColors(...)
Only available for ios
To change branding colors for android overwrite the salesforce colors in one of your resource files
setBrandingColors(colors: SalesforceBrandingColors) => Promise<{ success: boolean; }>| Param | Type |
| ------------ | ----------------------------------------------------------------------------- |
| colors | SalesforceBrandingColors |
Returns: Promise<{ success: boolean; }>
Interfaces
SalesforceChatConfiguration
| Prop | Type | Default |
| ------------------------ | -------------------- | --------------------|
| orgId | string |
| deploymentId | string |
| buttonId | string |
| liveAgentPod | string |
| defaultToMinimized | boolean? | false
| visitorName | string? | "Visitor"
SalesforceBrandingColors
All of these are optional change what you want
| Prop | Type | Default | Description |
| ------------------------ | -------------------- | --------------------| ----------- |
| navbarBackground | string? | #FAFAFA| Background of input section |
| navbarInverted | string? | #010101| Minimize and close button colors |
| brandPrimary | string? | #007F7F| Color of text cursor |
| brandSecondary | string? | #2872CC| Self text bubble background |
| brandSecondaryInverted | string? | #FCFCFC| Self text bubble text|
| contrastPrimary | string? | #000000| Agent text bubble text|
| contrastInverted | string? | #FFFFFF| Agent text bubble background |
| contrastSecondary | string? | #6D6D6D| Background fade on navbar|
| contrastQuaternary | string? | #F1F1F1| Background of chat area|
