Set up your app, step by step
This guide takes an app from nothing to connected: what to set up on the PurrCRM website, in order, and what your developers do in each build. It covers all four SDKs. Where a step differs between them, it has a tab for each; choose yours once and every tab on the page follows.
It assumes you have a workspace. If you do not, start with Getting started. You need to be the workspace’s owner or an admin: some of these pages are only theirs.
Before you start: which SDK
Section titled “Before you start: which SDK”| Your app is built with | Use | What you get |
|---|---|---|
| Flutter | The Flutter SDK | Everything, screens included: the messenger, the help center, in-app messages, the preferences screen. You theme them. |
| Kotlin or Java (Android) | The Android SDK | The SDK talks to PurrCRM and keeps the state. Add its built-in screens for the messenger, help center, tickets, inbox, preferences and in-app messages, or draw each screen in your app’s own look. |
| Swift (iOS) | The iOS SDK | The same, with built-in screens in UIKit, or your own in UIKit or SwiftUI. |
| A website or web app | The web SDK | The same, for React, Vue, Svelte or plain pages. For PurrCRM‘s own messenger, add one script tag instead. |
On Android and iOS you choose screen by screen: use the built-in screens, which take the look your team publishes in PurrCRM, or draw your own from the conversations, articles, messages and counts the SDK gives you. On the web, it’s the script tag’s messenger or your own screens. Each SDK has a setup check, a panel for developers that says what is set up and what is not; this guide uses it in step 6.
You will also want, along the way:
- Your backend developers, for signing people in (step 4) and telling PurrCRM who they are (step 9).
- A Firebase project, for pushes, on every platform (step 7).
- For links that open your app: your Apple team ID and bundle ID, and your Android package name and signing certificate’s SHA-256 fingerprint (step 8).
1. Make the app
Section titled “1. Make the app”Your first app was made when you signed up. To add another:
- Go to Settings › Workspace › General and press New app on the Apps card.
- Fill in Name (what your team calls it, such as Northwind Rewards). Slug is made from the name if you leave it empty.
- Under Features, tick what your app will have: Messenger, Help center and In-app messages. You can change these later.
- Fill in the brand if you like (Name contacts see, Accent colour, Logo, Support email). They show in emails and the help center, and the SDKs pass them to your app.
- Press Make the app.
PurrCRM then opens the new app’s Developers › Sign-in tab, because nobody can use an app until they can sign in to it. Switch between apps with the box at the top of the menu.
2. Turn on what the app has
Section titled “2. Turn on what the app has”- Open Settings › your app › General.
- On the Name and features card, tick Messenger, Help center and In-app messages for the parts your app has.
- Press Save on the bar at the bottom of the page.
A part that is off is off in every build. The SDKs hide it, and PurrCRM doesn’t serve it.


3. Copy the app key
Section titled “3. Copy the app key”Open Settings › your app › Developers › Install. The App key card shows the app’s key, app_…. The key is public: it goes inside your builds and names your app on every request. It never changes.
Your developers need two things from this page: the app key, and PurrCRM‘s address, https://app.purrcrm.com.


The Install card below the key (titled with your app’s name) is written for Flutter. It has five steps, each with code to copy, with your key and address already in it. Send your developers this page, or Install the Flutter SDK.
The Install card on this page shows Flutter code, so skip it. Your developers add the library and make one Crm in Application.onCreate with the key and address: Install, then Initialise.
crm = Crm( context = this, config = CrmConfig( apiBase = "https://app.purrcrm.com", appKey = "app_…", // from the App key card appVersion = BuildConfig.VERSION_NAME, ), auth = CrmAuth.tokens(tokens), // step 4 host = CrmHost(navigate = { where -> showCrmScreen(where) }),)crm.start()The Install card on this page shows Flutter code, so skip it. Your developers add the Swift package and make one Crm at launch with the key and address: Install, then Initialise.
let crm = Crm( config: CrmConfig( apiBase: URL(string: "https://app.purrcrm.com")!, appKey: "app_…", // from the App key card appVersion: Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""), auth: .tokens(tokens), // step 4 host: CrmHost(navigate: { destination in router.open(destination) }))Task { await crm.start() }The Install card on this page shows Flutter code, so skip it. Your developers install the package and make one Crm as the page starts: Install, then Initialise.
export const crm = new Crm({ config: { apiBase: "https://app.purrcrm.com", appKey: "app_…", // from the App key card appVersion: "2.4.0", }, auth: CrmAuth.tokens(tokens), // step 4 host: { navigate: (where, how) => showCrmPage(where, how) },});await crm.start();A browser also needs your site named on this page, in step 5.
4. Choose how people sign in
Section titled “4. Choose how people sign in”PurrCRM needs to know which of your users each request comes from. Open Settings › your app › Developers › Sign-in. There are three ways, and an app can use more than one at once:
- Identity secret (recommended). Press Make a secret. The secret starts
crm_is_…and is shown once. Copy it into your backend’s secrets, never into an app or a web page. Your backend uses it to sign a short token for the signed-in user, and the SDK asks your backend for a token whenever it needs one. The backend code, in Node, Python, Go, PHP and Ruby, is on Sign users in. It is the same for every platform. - Your own sign-in (key set), if your sign-in system already publishes its signing keys.
- Unverified sign-in, which takes the user’s id without a token. Anyone who knows or guesses an id could read that person’s messages, so use it for prototypes only. Turning it on asks you to type the app’s name.
Then check a token: paste one your backend made into Test a token and press Test. It says whose token it is.


CrmTokens.fetched { … }, then crm.session(CrmSession(guestId = user.id)) and crm.setReady(true) once the user is past your own first screens.CrmFetchedTokens { … }, then crm.session(CrmSession(guestId: user.id)) and crm.setReady(true) once the user is past your own first screens.CrmTokens.fetched(async () => …), then crm.session({ guestId: user.id }) and crm.setReady(true) once the user is past your own first steps.Use the same id for a person everywhere: in the token, and when your backend tells PurrCRM about them (step 9). Then the app, the website and the backend all add to one contact.
Let people write before they sign in
Section titled “Let people write before they sign in”By default, the messenger asks people to sign in before they write. On the same page, the Website visitors card can let them write first:
- Tick Let website visitors write before they sign in. People reading your website can now open the messenger, write to you and read the help center without signing in (Add the messenger to your website).
- To let people using your phone app do the same, also tick Also let people using your phone app write before they sign in. It can only be on while website visitors are on.
Each person who writes without signing in shows in your inbox and in Contacts as Visitor, with a short code. When they sign in on the same phone or browser, their conversations move to their own contact, with everything they wrote.
On a phone, a visitor is only made when the person opens the messenger, never when the app starts. Visitors can write to you and read the help center, but in-app messages, pushes and the inbox of notices stay for signed-in users. Phone visitors work in Flutter and Android apps. They are coming to the iOS SDK.
5. Websites: name them
Section titled “5. Websites: name them”Skip this step if no website or web app of yours calls PurrCRM.
A browser blocks a web page from calling another site unless that site allows it. So PurrCRM needs to know which of your sites may call it.
- Open Settings › your app › Developers › Install and find the Web origins card.
- In Sites, one a line, type each site the web SDK runs on, one per line, such as
https://www.northwind.example.- Use
https://.http://localhostis allowed while you develop. - Give the scheme and host only, with no path.
- You can add up to 20 sites.
- Use
- Press Save on the bar at the bottom of the page.


The test app keeps a list of its own: add your staging site there (step 10). More in Web origins.
6. Check a build is connected
Section titled “6. Check a build is connected”Run a build with the key in it, sign in, and open the Overview. The setup checklist’s Install the SDK in a build ticks itself when the first request from it arrives, and says which SDKs it has heard from and their versions, such as “Seen 5 minutes ago: Android 0.5.0, iOS 0.2.0”.
The What your app sees card on Settings › your app › Developers › Install shows what the package reads of your app: its brand, which parts are on, its languages and links.
Build with CrmConfig(debug = true). After the app starts, the setup check shows over it: the server, the key, sign-in, pushes and links, each green, amber or red with what to do, and buttons to send a test event, check for messages and try links. Never ship a release with debug on.
Build with CrmConfig(…, debug: true). After start(), the setup check shows over the app: the server, the key, sign-in, pushes and links, each green, amber or red with what to do, and buttons to send a test event, check for messages and try links. Never ship a release with debug on.
Start with debug: true. Once the page has loaded, the setup check panel shows: the server, the key, sign-in and your web origin, each green, amber or red with what to do, and buttons to send a test event, check for messages and try links. A request your web origins refuse shows here as the server being out of reach. Never ship with debug on.
7. Pushes
Section titled “7. Pushes”PurrCRM sends every push, to every platform, through your Firebase project.
- In the Firebase console, open your project, then Project settings › Service accounts, and press Generate new private key. A JSON file downloads.
- In PurrCRM, go to Settings › your app › Delivery › Push. On the Firebase key card, press Add the key and choose the file.
- Go to Settings › your app › Messaging rules. On the Push limits card, set how many marketing pushes a person may get a day, and your quiet hours.
- Under the card’s Advanced, Android channel and iOS thread name the channel and group your pushes arrive in. Leave them empty to use
messages. - Press Save on the bar at the bottom of the page.
Then, in each build:
Push: hand the package the Firebase token and every push, and create the Android notification channel.
Add Firebase Messaging to the app. Ask for the notification permission (Android 13 and later), create the notification channel the Android channel field names (messages unless you changed it) when the app starts, and hand the SDK the Firebase token and each push’s data: Push.
iPhones are reached through Firebase too: upload your Apple push key (APNs) to the Firebase project, under Project settings › Cloud Messaging. Add Firebase Messaging to the app, ask for the notification permission, and hand the SDK the Firebase token and each push’s userInfo: Push.
Browsers are reached through Firebase’s web messaging. The page asks for the notification permission and hands the SDK the Firebase token; a service worker forwards each push’s data to the page: Push.
To check it works, add your own phone under Testing › Preview on my phone. Then go to Settings › your app › Delivery › Push and press Push my phones on the Send a test push card. A push campaign goes on from here.
8. Links that open your app
Section titled “8. Links that open your app”Links let an email, a QR code or a person’s shared link open a page inside your app on a phone that has it, and the store or your website on one that does not.
- Go to Links › Setup. In the Link domain card, give the links a Name, fill in your iOS and Android apps and where a phone without the app goes, and press Turn links on.
- Go to Links › Destinations and add the places in your app that links may open. An app with the current SDK reports its own: press Add all.
- Back on Links › Setup, press Check what phones read: iOS and Android should both say Names the app.
- Your developers add what the In the app card shows to each build, and hand every link to the SDK: Flutter, Android, iOS, Web.
Deep links: links that open your app goes through each step, and what happens on each phone.
9. Connect your backend
Section titled “9. Connect your backend”Your backend tells PurrCRM who your users are (their name, email and attributes) and what they do outside the app.
- Open Settings › your app › Developers › Server keys and press Make a key.
- Fill in What it is for, such as Production servers.
- Under What it may do, tick what this key is allowed to do: Contacts, Events and Links. Give each key only what it needs.
- Press Make the key. The key starts
crm_sk_…and is shown once. Keep it in your servers’ secrets, never in an app or a web page.
Then send an Identify for a signed-in user, with the same id your tokens carry. The overview’s Make a server key, then send an Identify ticks itself when the first one arrives. Connect your backend has the code.
10. A test app for staging builds
Section titled “10. A test app for staging builds”A test app sits beside the live one with its own contacts, data and keys, so your staging builds and your team’s tests never reach your users.
- Go to Testing › Test mode and press Set up test mode.
- Switch the menu’s Live | Test to Test. Every settings page now edits the test app.
- In Test, repeat the steps the test app needs of its own, all under Settings › your app › Developers:
- Install shows its key,
app_test_…. - Sign-in needs a secret of its own,
crm_is_test_…. - Server keys needs a server key of its own.
- Web origins needs your staging site.
- Install shows its key,
- Build staging with the test app’s key, and point your staging backend at the test secret.
The SDKs know a test key by its prefix. Test mode says what else changes.
11. Before you release
Section titled “11. Before you release”- The release build carries the live app key, and its backend signs with a live identity secret.
debugis off: the setup check is for developers’ builds only.- The overview’s checklist is ticked for what you set up, and Install the SDK in a build names the SDKs and versions you expect.
- Your team has the inbox and help center ready: Set up the inbox and help center.
Next steps
Section titled “Next steps”- Your first in-app message, now that a build is connected.
- A push campaign.
- The section for your SDK: Flutter, Android, iOS or the web.