Skip to content

mlg87/react-native-zendesk-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-zendesk-support

React Native bridge to ZenDesk Support SDK on iOS and Android. This currently only supports using the out of the box views the ZenDesk Support SDK provides. At the moment, only anonymous authentication is supported.

React Native Version Support

This has only been tested to work with React Native 0.47, probably works in earlier versions.

Getting started

Follow the instructions to install the ZenDesk Support SDK for iOS and Android.

Don't forget to link the npm to React Native!

react-native link

Usage

Import the module

import ZenDeskSupport from 'react-native-zendesk-support';

Support Tickets

File a ticket

const identity = {
  customerEmail: '[email protected]',
  customerName: 'Foo Bar'
}

const customFields = {
  customFieldId: 'Custom Field Value'
}
ZenDeskSupport.callSupport(identity, customFields)

Bring up ticket history

const identity = {
  customerEmail: '[email protected]',
  customerName: 'Foo Bar'
}
ZenDeskSupport.supportHistory(identity)

Help Center

Show help center

ZenDeskSupport.showHelpCenter()

Show categories, e.g., FAQ

ZenDeskSupport.showCategories(['categoryId'])

Show sections, e.g., Account Questions

ZenDeskSupport.showSections(['sectionId'])

Show labels, e.g., tacocat

ZenDeskSupport.showLabels(['tacocat'])

Options

The Help Center functions above support a second parameter, an object of options.

const options = {
  articleVotingEnabled: false,
  hideContactSupport: false,
  showConversationsMenuButton: false,
  withContactUsButtonVisibility: 'OFF'
}
ZenDeskSupport.showHelpCenterWithOptions({ options })
ZenDeskSupport.showCategoriesWithOptions(['categoryId'], { options })
ZenDeskSupport.showSectionsWithOptions(['sectionId'], { options })
ZenDeskSupport.showLabelsWithOptions(['tacocat'], { options })
articleVotingEnabled boolean
  • true (default) – Show voting buttons on articles
  • false – Hide voting buttons on articles.
hideContactSupport boolean
  • true (default) – Shows contact support option in empty results on iOS
  • false – Hides contact support option in empty results on iOS
showConversationsMenuButton boolean
  • true (default) – Shows the right menu on Android which shows tickets
  • false – Hides the right menu on Android which shows tickets
withContactUsButtonVisibility string (case sensitive)
  • ARTICLE_LIST_AND_ARTICLE (default) – Show floating action button in list and article view
  • ARTICLE_LIST_ONLY – Show floating action button only in list views
  • OFF – Hide floating action button on articles and list views

Known bugs

  • Disappearing help center category headers on android

Upcoming Features

  • Authenticate using JWT endpoint
  • Theme support
  • Show article by id
  • Hiding "Contact us" on iOS from article and list view

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published