Skip to content

Add support to a new platform on the tipline

Caio Almeida edited this page Jan 5, 2024 · 8 revisions

Add support to a new platform on the tipline

Check Tipline currently integrates with Zendesk Sunshine Conversations, formerly Smooch. So, any platform supported by Smooch can be supported by Check. But it's important to be sure if these features are available for the new platform on Smooch:

  • Human-to-human conversation: Does the profile information in the channel created by the Smooch Slack integration for a given user contain any information that can uniquely identify that user (for example, a user ID or phone number)?
  • Report confirmation: Does the integration support the event message:delivery:channel?
  • 24 hours window: Does the integration support sending messages to users after 24 hours since their last message?

The features that each platform supports are listed here: https://docs.smooch.io/guide/channel-capabilities/.

A few places in different components need to be changed in order to support a new platform.

Check API

  • Add the identifier of the new integration to the constant SUPPORTED_INTEGRATION_NAMES in app/models/bot/smooch.rb
  • Add the identifier for the new integration to the CheckChannels in lib/check_channels.rb
  • Add the logic to get the user external identifier based on the plaform, to method smooch_user_external_identifier in app/models/bot/smooch.rb
  • Add the logic to match a Slack channel to a Smooch user in Check, to method get_indentifier, in app/models/bot/smooch.rb
  • Make sure that the user is able to advertise the tipline in the report visual card, by adding a value to a report setting... this can be done in config/initializers/report_designer.rb and public/report-design-default-image-template.html
  • If the service requires a special API endpoint to be called when a message is sent more than 24 hours since the last message from the user, add that logic to check-api/app/models/concerns/smooch_resend.rb

Check Web

  • Add a new <SmoochBotIntegrationButton /> component for that integration in src/app/components/team/SmoochBot/SmoochBotIntegrations.js
  • Display the icon for requests that come through that integration, in src/app/components/annotations/TiplineRequest.js
  • Make sure that the user is able to advertise the tipline in the report visual card, in files src/app/components/team/TeamReport/TeamReportComponent.js, src/app/components/media/ReportDesigner/ReportDesignerPreview.js and src/app/components/media/ReportDesigner/ReportDesignerImagePreview.js
  • Add the new channel to src/app/CheckChannels.js

Check Slack Bot

  • Add the logic to uniquely identify which user a Slack channel refers to, to index.js, around line 240