Migrate from Intercom to Gleap
Guides users through replacing Intercom with Gleap in their codebase. Covers client-side SDK swap and server-side API migration.
Detect Intercom
Search the codebase for Intercom integration. Use Grep to find:
Package references
package.json: @intercom/messenger-js-sdk, intercom-client, @intercom/intercom-react-native
Podfile: pod 'Intercom'
build.gradle: io.intercom.android:intercom-sdk
pubspec.yaml: intercom_flutter
composer.json: intercom/intercom-php
Gemfile: intercom-rails, intercom-ruby
Code patterns (client-side JavaScript — used by ALL web frameworks)
- JavaScript:
Intercom(, window.intercomSettings, widget.intercom.io, @intercom/messenger-js-sdk
- iOS:
import Intercom, Intercom.setApiKey, Intercom.loginUser
- Android:
import com.intercom, Intercom.initialize, Intercom.client()
- React Native:
import Intercom from '@intercom/intercom-react-native', IntercomModule
- Flutter:
import 'package:intercom_flutter', Intercom.instance
- Server:
intercom-client, intercom-php, intercom-ruby, intercom-go, intercom-java, Intercom.Dotnet
Report all findings to the user before proceeding.
API Key Resolution
Before asking the user for their Gleap API key, check these locations in order:
- User provided it in the conversation — use it directly
.env file in the project root — look for GLEAP_API_KEY=...
- Environment variable — check if
GLEAP_API_KEY is set via echo $GLEAP_API_KEY
- Not found — ask the user (available at https://app.gleap.io > Project Settings > Security > API Key)
When a key is found or provided, offer to save it to .env (and add .env to .gitignore if needed).
Workflow
- Detect Intercom using the patterns above. Report which platforms and files are affected.
- Confirm scope with the user: which parts to migrate (client SDK, server API, or both).
- Resolve Gleap API key using the API Key Resolution steps above.
- Read the mapping file for the detected platform from this skill's directory.
- Remove Intercom SDK: Uninstall packages, remove script tags, delete imports and configuration.
- Install Gleap SDK: Follow the installation steps from the mapping file (or reference the
gleap-sdk-setup skill if installed).
- Replace API calls: Use the mapping tables to convert every Intercom call to its Gleap equivalent. Use the resolved API key in initialization code.
- Migrate server-side code if applicable: Replace Intercom REST API calls with Gleap REST API calls. See
mapping-server-api.md.
- Clean up: Remove Intercom-specific config (API keys, app IDs,
intercomSettings, push notification handlers).
- Verify: Build and run the project. Search for any remaining
intercom references.
Mapping Files
Read the appropriate file based on detected platform:
- JavaScript / Web:
mapping-javascript.md — also applies to all server-side web frameworks (Laravel, Django, Rails, ASP.NET, Spring Boot, Phoenix, etc.) since they all use the JavaScript SDK on the client side
- iOS (Swift / Objective-C):
mapping-ios.md
- Android (Kotlin / Java):
mapping-android.md
- React Native:
mapping-react-native.md
- Flutter:
mapping-flutter.md
- Server-side REST API:
mapping-server-api.md
For projects using multiple platforms, read all relevant files. Common combinations:
- Web framework + server SDK (e.g., Laravel with
intercom-php, Rails with intercom-ruby): Use mapping-javascript.md for client-side and mapping-server-api.md for server-side
- React Native + server API: Use
mapping-react-native.md and mapping-server-api.md
Important Notes
- Intercom uses
app_id + api_key (separate for iOS/Android). Gleap uses a single API key per project from https://app.gleap.io
- Intercom's
boot() combines initialization + user identification. In Gleap, these are separate: initialize() then identify()
- Intercom's
shutdown() = Gleap's clearIdentity()
- Intercom's
update() = Gleap's updateContact()
- Intercom custom user attributes map to Gleap's
customData object (max 35 keys, primitives only)
- Intercom company data maps to Gleap's
companyId + companyName fields in identify
- Features without direct Gleap equivalent: product tours (
startTour), tickets view (showTicket), news items (showNews). Note these to the user as requiring alternative approaches
- Server-side: Intercom REST API uses
Bearer token auth. Gleap uses Api-Token header (legacy) or Bearer + Project headers (v3 API)
1---2name: migrate-from-intercom3description: Migrates projects from Intercom to Gleap. Detects Intercom SDK integration (JavaScript, iOS, Android, React Native, Flutter), removes it, installs the Gleap SDK, and replaces all Intercom API calls with Gleap equivalents. Also covers server-side REST API migration. Use when switching from Intercom to Gleap, replacing Intercom, or migrating away from Intercom.4---56# Migrate from Intercom to Gleap78Guides users through replacing Intercom with Gleap in their codebase. Covers client-side SDK swap and server-side API migration.910## Detect Intercom1112Search the codebase for Intercom integration. Use `Grep` to find:1314### Package references15- `package.json`: `@intercom/messenger-js-sdk`, `intercom-client`, `@intercom/intercom-react-native`16- `Podfile`: `pod 'Intercom'`17- `build.gradle`: `io.intercom.android:intercom-sdk`18- `pubspec.yaml`: `intercom_flutter`19- `composer.json`: `intercom/intercom-php`20- `Gemfile`: `intercom-rails`, `intercom-ruby`2122### Code patterns (client-side JavaScript — used by ALL web frameworks)23- JavaScript: `Intercom(`, `window.intercomSettings`, `widget.intercom.io`, `@intercom/messenger-js-sdk`24- iOS: `import Intercom`, `Intercom.setApiKey`, `Intercom.loginUser`25- Android: `import com.intercom`, `Intercom.initialize`, `Intercom.client()`26- React Native: `import Intercom from '@intercom/intercom-react-native'`, `IntercomModule`27- Flutter: `import 'package:intercom_flutter'`, `Intercom.instance`28- Server: `intercom-client`, `intercom-php`, `intercom-ruby`, `intercom-go`, `intercom-java`, `Intercom.Dotnet`2930Report all findings to the user before proceeding.3132## API Key Resolution3334Before asking the user for their Gleap API key, check these locations in order:35361. **User provided it in the conversation** — use it directly372. **`.env` file** in the project root — look for `GLEAP_API_KEY=...`383. **Environment variable** — check if `GLEAP_API_KEY` is set via `echo $GLEAP_API_KEY`394. **Not found** — ask the user (available at https://app.gleap.io > Project Settings > Security > API Key)4041When a key is found or provided, offer to save it to `.env` (and add `.env` to `.gitignore` if needed).4243## Workflow44451. **Detect Intercom** using the patterns above. Report which platforms and files are affected.462. **Confirm scope** with the user: which parts to migrate (client SDK, server API, or both).473. **Resolve Gleap API key** using the API Key Resolution steps above.484. **Read the mapping file** for the detected platform from this skill's directory.495. **Remove Intercom SDK**: Uninstall packages, remove script tags, delete imports and configuration.506. **Install Gleap SDK**: Follow the installation steps from the mapping file (or reference the `gleap-sdk-setup` skill if installed).517. **Replace API calls**: Use the mapping tables to convert every Intercom call to its Gleap equivalent. Use the resolved API key in initialization code.528. **Migrate server-side code** if applicable: Replace Intercom REST API calls with Gleap REST API calls. See `mapping-server-api.md`.539. **Clean up**: Remove Intercom-specific config (API keys, app IDs, `intercomSettings`, push notification handlers).5410. **Verify**: Build and run the project. Search for any remaining `intercom` references.5556## Mapping Files5758Read the appropriate file based on detected platform:5960- **JavaScript / Web**: `mapping-javascript.md` — also applies to all server-side web frameworks (Laravel, Django, Rails, ASP.NET, Spring Boot, Phoenix, etc.) since they all use the JavaScript SDK on the client side61- **iOS (Swift / Objective-C)**: `mapping-ios.md`62- **Android (Kotlin / Java)**: `mapping-android.md`63- **React Native**: `mapping-react-native.md`64- **Flutter**: `mapping-flutter.md`65- **Server-side REST API**: `mapping-server-api.md`6667For projects using multiple platforms, read all relevant files. Common combinations:68- **Web framework + server SDK** (e.g., Laravel with `intercom-php`, Rails with `intercom-ruby`): Use `mapping-javascript.md` for client-side and `mapping-server-api.md` for server-side69- **React Native + server API**: Use `mapping-react-native.md` and `mapping-server-api.md`7071## Important Notes7273- Intercom uses `app_id` + `api_key` (separate for iOS/Android). Gleap uses a single API key per project from https://app.gleap.io74- Intercom's `boot()` combines initialization + user identification. In Gleap, these are separate: `initialize()` then `identify()`75- Intercom's `shutdown()` = Gleap's `clearIdentity()`76- Intercom's `update()` = Gleap's `updateContact()`77- Intercom custom user attributes map to Gleap's `customData` object (max 35 keys, primitives only)78- Intercom company data maps to Gleap's `companyId` + `companyName` fields in identify79- Features without direct Gleap equivalent: product tours (`startTour`), tickets view (`showTicket`), news items (`showNews`). Note these to the user as requiring alternative approaches80- Server-side: Intercom REST API uses `Bearer` token auth. Gleap uses `Api-Token` header (legacy) or `Bearer` + `Project` headers (v3 API)