Skip to content

Commit d35b1c5

Browse files
committed
add additional information for android
1 parent c007fd7 commit d35b1c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

android/src/main/java/org/andrewbestbier/salesforcechat/RNSalesforceChatModule.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ public void configLaunch(ReadableMap chatSettings, ReadableMap userSettings) {
7878
.value(chatSettings.getString("version")).build("Version__c", "Version__c", PreChatField.STRING);
7979
PreChatField pointOfUserJourney = new PreChatField.Builder().hidden(true)
8080
.value(chatSettings.getString("pointOfUserJourney")).build("PointOfCustomerJourney__c", "PointOfCustomerJourney__c", PreChatField.STRING);
81+
PreChatField additionalInformation = new PreChatField.Builder().hidden(true)
82+
.value(chatSettings.getString("additionalInformation")).build("AdditionalInformation__c", "AdditionalInformation__c", PreChatField.STRING);
83+
PreChatField botMessage = new PreChatField.Builder().hidden(true)
84+
.value(chatSettings.getString("botMessage")).build("GenericBotMessage__c", "GenericBotMessage__c", PreChatField.STRING);
8185
PreChatField suppliedEmail = new PreChatField.Builder().hidden(true)
8286
.value(userSettings.getString("email")).build("SuppliedEmail", "SuppliedEmail", PreChatField.EMAIL);
8387
PreChatField suppliedName = new PreChatField.Builder().hidden(true)
@@ -104,6 +108,8 @@ public void configLaunch(ReadableMap chatSettings, ReadableMap userSettings) {
104108
preChatFields.add(equipment);
105109
preChatFields.add(version);
106110
preChatFields.add(pointOfUserJourney);
111+
preChatFields.add(additionalInformation);
112+
preChatFields.add(botMessage);
107113

108114

109115
// Create an entity field builder for Case fields
@@ -127,6 +133,8 @@ public void configLaunch(ReadableMap chatSettings, ReadableMap userSettings) {
127133
.addPreChatEntityField(caseEntityBuilder.build("EquipmentV2__c", "EquipmentV2__c"))
128134
.addPreChatEntityField(caseEntityBuilder.build("Version__c", "Version__c"))
129135
.addPreChatEntityField(caseEntityBuilder.build("PointOfCustomerJourney__c", "PointOfCustomerJourney__c"))
136+
.addPreChatEntityField(caseEntityBuilder.build("AdditionalInformation__c", "AdditionalInformation__c"))
137+
.addPreChatEntityField(caseEntityBuilder.build("GenericBotMessage__c", "GenericBotMessage__c"))
130138
.build("Case");
131139
// Add the entities to the list
132140
preChatEntities.add(caseEntity);

0 commit comments

Comments
 (0)