An open API service indexing awesome lists of open source software.

https://github.com/jimstrike/craft-intercom-messenger

Intercom Messenger plugin for Craft 3, Craft 4, Craft 5
https://github.com/jimstrike/craft-intercom-messenger

craft-plugin craft-website craftcms craftcms-plugin customer-care customer-chat customer-chat-plugin intercom-messenger messaging messenger-bot

Last synced: 5 months ago
JSON representation

Intercom Messenger plugin for Craft 3, Craft 4, Craft 5

Awesome Lists containing this project

README

        

# Intercom Messenger plugin for Craft CMS 4.x|5.x

This is Intercom: the Business Messenger you and your customers will love

![Screenshot](src/assets/dist/images/logotype-transparent-black.svg)

## Overview

Sure, it does live chat. But there’s also bots, apps, product tours, and more
like email, messages, and a help center that help you build relationships with your customers.

For more information visit: [Intercom.com](https://www.intercom.com/).

## Requirements

This plugin requires Craft CMS 4.0.0|5.0.0 or later.

You will need an Intercom [trial](https://www.intercom.com/pricing) or [subscription](https://www.intercom.com/pricing) in order to use this plugin. Or you can create a free [developer account](https://app.intercom.com/a/developer-signup) to build and test Intercom Messenger in development environment before signing up for a subcription.

For more information visit [Intercom.com](https://www.intercom.com/).

## Installation

### From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for "Intercom Messenger". Then click on the "Install" button.

### With Composer

```bash
# Go to project directory
cd /path/to/my/craft-project

# Tell Composer to load the plugin
composer require jimstrike/craft-intercom-messenger

# Tell Craft to install the plugin
./craft plugin/install intercom-messenger
```

## Setting up and customizing your Messenger to start chatting with customers

Before enabling this plugin in Craft control panel you will need to setup and customize your Messenger on [Intercom](https://www.intercom.com/).

As a requirement you will need an Intercom [trial](https://www.intercom.com/pricing) or [subscription](https://www.intercom.com/pricing) in order to use this plugin. Or you can create a free [developer account](https://app.intercom.com/a/developer-signup) to build and test Intercom Messenger in development environment before signing up for a subcription.

Here's a collection of links that will help you get started with [Intercom](https://www.intercom.com/):

- [Homepage](https://www.intercom.com/)
- [About Messenger](https://www.intercom.com/help/en/collections/2094767-the-intercom-messenger)
- [Find your app ID](https://www.intercom.com/help/en/articles/3539-where-can-i-find-my-workspace-id-app-id)
- [List trusted domains](https://www.intercom.com/help/en/articles/4418-list-trusted-domains-you-use-with-intercom)
- [Identity verification](https://www.intercom.com/help/en/articles/183-enable-identity-verification-for-web-and-mobile)
- [Customize basics](https://www.intercom.com/help/en/articles/178-customize-the-intercom-messenger-basics)
- [Developer account](https://app.intercom.com/a/developer-signup)
- [Help center](https://www.intercom.com/help)

## Using "Intercom Messenger" on your site

After you have setup and customized the Messenger on Intercom go to "Intercom Messenger" site settings in your Craft control panel, follow the instructions and enable it.

## Advanced configuration

> for Craft developers

### Override settings

Copy plugin's `src/config.php` to your project's `config` folder as `intercom-messenger.php` and make your changes there to override default settings.

### Insert Intercom Messenger chat in twig templates

```twig
{##
# @param int|null siteId (defaults to current site ID)
# @param bool wrap (whether to wrap with ... tag)
#
# @return string (Intercom Messenger chat script)
#}
intercom_messenger_script(int siteId = null, bool wrap = false)
craft['intercom-messenger'].script(int siteId = null, bool wrap = false)
```

> **Note:**
To avoid code duplication, script will be inserted only if plugin is disabled in `Intercom Messenger → Site Settings` or `"config/intercom-messenger.php"` file.

### Twig examples

```twig
{##
# Insert inside twig js tag.
#}
{% js %}
{{ intercom_messenger_script(currentSite.id)|raw }}
{#{ craft['intercom-messenger'].script(currentSite.id)|raw }#}
{% endjs %}

{##
# Insert before