Reference

Sendbird

Sendbird is a cloud-based chat and messaging platform.

Sendbird is a cloud-based chat and messaging platform.

Category: Communication. Adds 13 actions to a care flow.

What to configure

Set these once, on the extension in Awell Studio. An action fails at run time if a required setting is missing.

SettingRequiredNotes
Application IDYesVisit https://dashboard.sendbird.com/ to retrieve Application ID for the app of your choosing Stored as a secret.
Chat API tokenYesVisit Application's settings and go to Settings > Application > General > API tokens to retrieve either Master API token or Secondary API token Stored as a secret.
Desk API tokenYesVisit Application's settings and go to Settings > Desk > Credentials to retrieve Desk API token Stored as a secret.

Actions

Sendbird adds these 13 actions to a care flow. Add one to a step, then fill in its inputs.

Activate user

Activates a user using the Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.

Activates a user, using the "Update user" endpoint, in the Chat API. The user is activated by setting is_active to true.

Create customer

Creates a customer using the Desk API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
Sendbird IDstringYesThe Sendbird ID of a customer which must be an ID that already exists in Sendbird (eg: user id).

Returns:

Data pointType
customerIdnumber

Creates a customer using the Desk API. Only the sendbirdId is passed and it must be an ID that already exists in Sendbird's Chat platform (eg: the userId of an existing user). The customerId of the newly created customer is stored as data point.

To add custom fields to your customer, use the Update custom fields action.

Create ticket

Creates a ticket using the Desk API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
Customer IDnumericYesA customer's unique ID.
Channel namestringYesSpecifies the title of a ticket, which will be the group channel name in Sendbird Chat platform as well. Maximum length is 100 characters.
Related channel URLsstringNoA comma-separated string of group channel URLs for reference, where the corresponding customer belongs. Can have up to 3 group channel URLs.
Group keystringNoSpecifies the unique key of a group for ticket assignment. The key can be a mix of lowercase letters, hyphens, underscores, or numbers.
PrioritystringNoSpecifies the priority of a ticket. Acceptable values are the following: "LOW", "MEDIUM", "HIGH", and "URGENT". Defaults to: "MEDIUM".
Custom fieldsjsonNoA JSON object that can store up to twenty key-value items for additional customer information. The specified keys must be registered as a custom field in Sendbird.

Returns:

Data pointType
channelUrlstring
relatedChannelUrlsstring
ticketIdnumber

Creates a ticket using the Desk API. The ticketId of the newly created ticket is stored as data point.

Please note that the Ticket won't be shown in the Sendbird console until the user for which that Ticket was created writes a message inside the Chat.

Create user

Creates a user using the Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesSpecify a unique ID for the user, maximum length is 80 characters. Don't use personally identifiable information (PII) for the ID.
NicknamestringNoThe user's nickname. Maximum length is 80 characters. If left empty, we will use the patient's first and last name.
Issue access tokenbooleanNoDetermines whether to create an access token for the user.
Profile URLstringNoThe URL of the user's profile image.
MetadatajsonNoSpecifies a JSON object to store up to five key-value items for additional user information such as a phone number, an email address, or a long description of the user. The key must not have a comma (,) and its length is limited to 128 characters. The value must be a string and its length is limited to 190 characters.

Returns:

Data pointType
userIdstring

Creates a user in Sendbird using the Chat API. See Update metadata to check metadata field details. The userId of the newly created user is then saved as a data point.

Deactivate user

Deactivates a user using the Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.
Leave all group channels upon deactivationbooleanNoDetermines whether the user leaves all joined group channels upon deactivation. Defaults to true if not specified.

Deactivates a user, using the "Update user" endpoint, in the Chat API. Optionally, it can be set for the user to Leave all group channels upon deactivation.

The user is deactivated by setting is_active to false.

Delete metadata

Deletes metadata from a user using the Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.
Metadata keystringNoThe key of the metadata item to delete. If not specified, all items of the metadata are deleted.

Deletes user metadata using the Chat API. Takes the key of a metadata item to be deleted (deletes one key at a time if a key is provided). If not specified, all items of the metadata are deleted.

Delete user

Deletes a user using the Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.

Deletes a user in Sendbird using the Chat API.

Get customer

Retrieve information about a customer using the Desk API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
Customer IDnumericYesThe customer's unique ID in Sendbird.

Returns:

Data pointType
channelTypestring
createdAtdate
customFieldsstring
displayNamestring
projectnumber
sendbirdIdstring

Retrieves information on a specific customer using the Desk API. The following fields are saved as a data point:

  • Sendbird ID
  • Channel Type
  • Project
  • Created At
  • Display Name
  • Custom Fields (stored as string)

Get user

Gets user using Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.

Returns:

Data pointType
accessTokenstring
createdAtdate
hasEverLoggedInboolean
isActiveboolean
lastSeenAtdate
metadatastring
nicknamestring

Retrieve information about a user using the Chat API. The following fields are saved as a data point:

  • Nickname
  • Access token
  • Is active
  • Created at
  • Last seen at
  • Has ever logged in
  • Metadata (stored as string)

Update customer's custom fields

Updates custom fields of a customer using the Desk API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
Customer IDnumericYesThe customer's unique ID in Sendbird.
Custom fieldsjsonYesA JSON object that can store up to twenty key-value items for additional customer information. The specified keys must be registered as a custom field in Sendbird.

Updates a customer's custom fields using the Desk API.

Custom fields is a JSON object that can store up to twenty key-value items for additional customer information such as a phone number, an email address, or a long description of the customer.

The specified keys must be registered as a custom field in Settings > Customer fields of your dashboard beforehand. The key must not have a comma (,) and its length is limited to 20 characters. The value's length is limited to 190 characters.

Update metadata

Updates user metadata using Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.
MetadatajsonYesA JSON object that can store up to five key-value items for additional user information.

Updates the user's metadata using the Chat API. Only updates existing or adds new fields to metadata. To delete some metedata fields, check the Delete metadata action.

Metadata is a JSON object that can store up to five key-value items of additional user information such as a phone number, an email address, or a long description of the user. The key must not have a comma (,) and its length is limited to 128 characters. The value must be a string and its length is limited to 190 characters.

Update ticket

Update a ticket using the Desk API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
Ticket IDnumericYesA customer's unique ID.
PrioritystringNoSpecifies the priority of a ticket. Acceptable values are the following: "LOW", "MEDIUM", "HIGH", and "URGENT". Defaults to: "MEDIUM".
Related channel URLsstringNoA comma-separated string of group channel URLs for reference, where the corresponding customer belongs. Can have up to 3 group channel URLs.

Update user

Updates a user using the Chat API.

This action can be previewed in Studio before you publish.

InputTypeRequiredDescription
User IDstringYesThe user's unique ID in Sendbird.
NicknamestringNoThe user's nickname. Maximum length is 80 characters.
Issue access tokenbooleanNoDetermines whether to revoke the existing access token and create a new one for the user.
Profile URLstringNoThe URL of the user's profile image.

Updates a user using the Chat API.

Please note that updating metadata of a user needs to be done with the Update metadata action.

Setup and notes

Sendbird is a cloud-based chat and messaging platform that enables developers to integrate real-time messaging functionality into their applications.

Sendbird offers a range of features, including real-time chat, group chat, one-on-one messaging, push notifications, and file sharing. It supports various platforms and programming languages, making it flexible and accessible for developers to integrate with different applications.

Extension settings

In order to set up this extension, you will need:

  1. An Application ID - visit https://dashboard.sendbird.com/ to retrieve **Application ID for the app of your choosing
  2. A Chat API token** - visit Application's settings and go to **Settings > Application > General > API tokens to retrieve either Master API token or Secondary API token
  3. A Desk API token** - visit Application's settings and go to Settings > Desk > Credentials to retrieve Desk API token

Changelog

2023-08-22

  • add relatedChannelUrls field to Create ticket action

Where this page comes from

The settings, actions, inputs, outputs and webhooks above are generated from the extension's own code, at @awell-health/awell-extensions v2.1.159. They match what the platform actually does rather than a description of it.

Field-level detail also appears in Awell Studio when you configure the action. Something wrong or missing? Email support@awellhealth.com.

On this page