Messaging app extension

Messaging app extension overview


The messaging app extension provides a way to integrate a messaging service directly into Pipedrive. For that, we have created a deep integration point with our Messaging inbox inside the Leads Inbox of Pipedrive.

1752

Messaging inbox - active conversation details

An app with messaging capability can take advantage of our public API endpoints (Channels API) and manifest mapping to create a seamless flow of receiving and sending messages through a third-party tool right inside Pipedrive.

1503

Messaging inbox with messages from Facebook and WhatsApp

By using our messaging app extension, your app user can send and receive messages from an external service (such as Facebook Messenger for Business, WhatsApp for Business, etc.) without leaving Pipedrive, as well as quickly link conversations to contacts, leads and/or deals.
The chat window allows you to easily display conversations from all of your channels, as well as to filter conversations from a specific channel when you need them.

The Channels API has public endpoints to create and delete channels and receive incoming messages. The API can also request your app’s endpoints to retrieve previous conversations and messages, senders/participants’ info, and send new messages.

460

Selection of messaging apps and their channels

It’s possible to enable company-wide visibility for the app, which allows the integration’s channels and conversations to be used by everyone in the Pipedrive company.

1752

Messaging app in Pipedrive Settings


Development process


First steps to take

  • To begin, you’ll need access to the Developer Hub, where your app is maintained
  • In Developer Hub, click on your app’s name and go to the OAuth & access scopes tab
  • Select the messaging integration scope** to access the Channels API and integrate with the messaging app extension
  • Upload the manifest for messaging app extension. You can find a template of the manifest and all information about the endpoints needed for the integration on the implementing Messaging app extension page.

Connecting the app

When establishing the connection, your app must first use OAuth2.0. When you have stored the access and refresh tokens (step 4 and 5 of OAuth authorization) after the app user has accepted the scopes (step 3 of OAuth authorization), your app can make the first call on behalf of the user to create a new channel through the Channels API’s POST /channels endpoint in Pipedrive's public API.

https://{COMPANYDOMAIN}.pipedrive.com/api/v1/channels
NameTypeRequired/OptionalDescription
namestringRequiredA unique channel name
provider_channel_idstringRequiredA unique provider_channel_id string that represents the channel ID. Pipedrive will use this ID in requests to ask your integration for data about the channel.

See template for messaging manifest for an example of how the providerChannelId is used.
avatar_urlstring, URLOptionalThe URL for the image to be displayed as the channel’s icon in the chat window.

The avatar must be compatible with the HTML IMG tag.

The recommended icon size is 48x48px, in a square format png or jpg.
provider_typestringOptionalIt controls the icons (next to the conversation). In the future, the messaging app extension may handle some features differently according to the provider_type, such as templates and text editors (WYSIWYG).

Possible values facebook, whatsapp or other.
template_supportbooleanOptional (defaults to false)By setting true, if your provider type supports template, our API will retrieve the information needed (currently only supported for whatsapp
type providers).
{
   "success":true,
   "data":{
      "id":"e283f878-7ef9-4294-8e5c-04a7d003fd92",
      "name":"My Channel",
      "avatar_url":"http://my-domain.com/images/test.png",
      "provider_channel_id":"4645c2e3-b5df-4acd-8299-76864c22a4ac",
      "marketplace_client_id":"57da5c3c55a82bb4",
      "pd_company_id":123,
      "pd_user_id":321,
      "created_at":"2022-03-01 00:00:00",
      "provider_type":"other",
      "template_support":false
   }
}

After Pipedrive registers the channel, manifest endpoints will start to be called.

First, Pipedrive will request from thegetConversations endpoint mapped in the manifest to the service's endpoint, providing information in a paginated format around messages and conversations happening in the channel. Like all requests done to manifest endpoints by Pipedrive, this will follow basic authentication rules.

If the service provides values in the correct format, next requests will be made to various endpoints(getSenderByID and getTemplates) to finalize the connection depending on the setup and criteria of the integration.

818

Installation flow of app with messaging app extension

Sharing the app

This app extension allows sharing an installation with all Pipedrive company users. To enable this option for your app, please get in touch with the Marketplace team.

Once the team enables it, an extra step is shown during the installation for the user right after giving access to the OAuth scopes.

1330

The user has the option to share the app company-wide.

Once shared, the channels registered by the app will be available to everyone in the company. All users can use most of what the extension has to offer, with a few exceptions:

  • Only the installation owner can delete conversations.
  • Only the installation owner can change the visibility (share/unshare the app installation).
  • Only the installation owner can uninstall the app.
  • If the app has more than one channel, only the installation owner can remove a channel.
911

The messaging app can be shared in between account users