Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README #20

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ⛔️**