title | description |
---|---|
Zodiva Chat SDK |
Open Zodiva Chat in a cordova/phonegap based app. |
This plugin launches Zodiva's Chat SDK when calling cordova.zodiva.open()
.
cordova plugin add https://github.com/abduljaleel/zodiva
cordova.zodiva.open('app_id','secret_key');
Zodiva SDK will ask for the user's email, name and gender
For now zodiva lets you set the current user. All you have to do is pass the current users email, gender and name. Something like this -
cordova.zodiva.open('app_id','secret_key','device token','[email protected],dn=Test Sdk,gender=male');
Zodiva SDK will use the email, name and gender provided by the app. Gender can be only
male
orfemale
This third and fourth paremeters are optional.
Third parameter is the device token for the user. This will be used to send push notification to the user. You can set it up in your Dashboard
In case you do not use the fourth parameter the SDK will ask for the user's email, name and gender. If you pass this string as the fourth parameter the sdk will start the session automatically.
To get the app_id and secret_key you will have to first Sign up on Zodiva. You will find the app id and app secret in the account details section
.
Select Customize
from left side menu. Most of the things here are for the JS widget.
- Your Texts: These are the options that are shown when a user starts a session for the first time. It helps to understand the need of the user. (what are the services offered). You can edit the predefined options or add your own. To add type down the
text
and give it apriority value
- Primary Color: This is the primary color of the SDk. Any Color here will change the color of elements like
Navigation Bar
etc. - Secondary Color: This is the secondary color of the SDk. Any Color here will change the color of elements like
Primary Buttons
etc.
Under Customize
from left side menu. These are the questions (option based) that are shown to the user to capture additional information before even a stylist connetcs with him
- Choose a Question: Select an option that you have already entered in the section above.
- Add a Question: Use this to add questions under that option for the user, to be asked by the zodiva bot just after the session starts.
- Enter a Question: Use the box on the left to enter question. You can add as many questions as you want.
- Enter Options: Use the box on the right to enter the options. Give a comma between each option. Only
text
options are supported as of now. User can only pick one option.
Under SDK Settings
from left side menu. For now only (option based) android is supported
- Server Key: (Required)This is the server key in the google developer console. Go to console > Credentials.
- Sound Name: (Optional)Sound to be played when a notification comes in. The file should be already added by in your app.
- Icon Name: (Optional)Icon to be shown in the status bar. The file should be already added by in your app.
- Color:(Optional) Color of the background image for the icon. Needs HEX vlaue eg #111111.