To install the plugin in your project, run either of the below mentioned commands:
- flutter pub add business_messaging_sdk
(or)
add the following in pubspec.yaml
- dependencies:
business_messaging_sdk: ^1.0.0
Android
The Business Messaging SDK's dependencies are available at maven.zohodl.com. To include them in your Android project, you must add the relevant Maven URLs to your project's build.gradle file.
To perform this, open the Android folder of your Flutter project in Android Studio and add the following Maven repository to the project-level build.gradle file.
What are session variables?
These
variables are dynamically retrieved during the bot conversations. These
variables are org-specific and accessible across GC flows.
You can perform these actions with the session variable as mentioned:
Set Session Variable:
- import 'package:business_messaging_sdk/business_messaging_sdk.dart' show BusinessMessagingSDK;
List<Map<String, String>> sessionVariable = [{"name": "YOUR VARIABLE NAME", "value" : "YOUR VARIABLE VALUE"}, {"name": "YOUR VARIABLE NAME", "value": "YOUR VARIABLE VALUE" }];
BusinessMessagingSDK.setSessionVariable(appId,sessionVariable);
Update Session Variable:
- import 'package:business_messaging_sdk/business_messaging_sdk.dart' show BusinessMessagingSDK;
List<Map<String, String>> sessionVariable = [{"name": "YOUR VARIABLE NAME", "value" : "YOUR VARIABLE VALUE"}, {"name": "YOUR VARIABLE NAME", "value": "YOUR VARIABLE VALUE" }];
BusinessMessagingSDK.updateSessionVariable(orgId,appId,domain,sessionVariable);