Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
djorka committed Sep 17, 2024
1 parent 84d31e6 commit 9c3187b
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Forethought.INSTANCE.hide();

## Additional Usage

### Data Parameters
### Widget Parameters

A comprehensive list of non workflow context variable parameters can be found [here.](https://support.forethought.ai/hc/en-us/articles/1500002917301-Installation-Guide-for-Solve-Widget#:~:text=Additional%20Attributes) To pass widget parameters, add any or all the following before calling `.show()`:

Expand All @@ -86,9 +86,17 @@ val dataParameters = mapOf(
Forethought.INSTANCE.dataParameters = dataParameters
```

### Handoffs
### Callback Methods

ForethoughtListener includes the following callback methods.
- `forethoughtHandoffRequested`
- Called when the user is being handed off to another helpdesk (e.g. Salesforce, Zendesk, Kustomer, etc.).
- `onWidgetClosed`
- Called when the widget is being closed.
- `onWidgetError`
- Called when the widget does not render properly.

To handoff from Forethought to another helpdesk / provider, implement the following:
To implement these callback methods, add the following:

1. Make sure the `Activity/Fragment` implements the ForethoughtListener interface, and override it's methods. The methods
do have default implementations so they are optional.
Expand Down Expand Up @@ -190,6 +198,22 @@ override fun onDestroy() {
}
```

### Handoffs

The `forethoughtHandoffRequested` callback method has a single parameter that will include all the data normally used by Forethought to handoff to the helpdesk's widget in the browser. This data will have the following type:

```kotlin
data class ForethoughtHandoffData(
val event: String?,
val name: String?,
val email: String?,
val question: String?,
val integration: String?,
val department: String?,
val additionalParameters: Map<String, Any>?,
)
```

### Plugins

**⛔️ Plugins were removed in version 1.0.0 ⛔️**

0 comments on commit 9c3187b

Please sign in to comment.