File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,40 @@ The yaml file contains a custom key of `:document_types` not used by wraith but
170
170
bundle exec rake wraith:update_document_types[:sample_size]
171
171
```
172
172
173
+ ## Webchat
174
+
175
+ ### How to add a new webchat provider
176
+ 1 . Open to ` lib/webchat.yaml `
177
+ 2 . Append new entry:
178
+ ``` yaml
179
+ - base_path : /government/contact/my-amazing-service
180
+ open_url : https://www.my-amazing-webchat.com/007/open-chat
181
+ availability_url : https://www.my-amazing-webchat.com/007/check-availability
182
+ ` ` `
183
+ 3. Deploy changes
184
+ 4. Go to https://www.gov.uk/government/contact/my-amazing-service
185
+ 5. Finished
186
+
187
+ ### Required configuration
188
+
189
+ #### Base path
190
+ This is the base path of a contact page, for example, ` /government/organisations/hm-revenue-customs/contact/child-benefit`.
191
+ This path should always be a contact page, any other content page type will result in the webchat component not being loaded.
192
+
193
+ # ### Availability URL
194
+ This URL is used to check the availability of agents at regular intervals.
195
+
196
+ | Function | Required |
197
+ |-----------|-----------|
198
+ | Request Method | GET |
199
+ | Response Format | JSON |
200
+ | Request Example | {"status":"success","response":"BUSY"} |
201
+ | Valid statuses | ["BUSY", "UNAVAILABLE", "AVAILABLE", "ERROR"] |
202
+
203
+ # ### Open URL
204
+ This url is used to start a webchat session.
205
+ This url should not include session ids or require anything specific parameters to be generated.
206
+
173
207
# # Licence
174
208
175
209
[MIT License](LICENCE)
You can’t perform that action at this time.
0 commit comments