Intercome API in Python Development: The basics
What is Intercom?
- Intercom is an API that can be used to track customer activities or actions performed over your product or website.
- Also, you can personally communicate with them through targeted content, behavior-driven emails, in-app, and web messages.
Use of Intercom:
- See, Track and filter your customers and what they do.
- Onboard and engage users such as, Turn more signups into active, valuable customers with targeted email & in-app messages.
- Send messages to users in your app, or by email or push, whenever they meet certain criteria. You can also set up multiple messages in an ongoing campaign.
- All Intercom products come with the free Intercom Platform, which lets you see who your users and visitors are, and what they do in your app and on your site. And you can start having conversations with people.
- Check results and test new ideas to continually optimize performance and prove impact.
Team who require Intercom:
- Sales teams who want to talk to unregistered users (visitors) on their website to answer their questions and help them become customers.
- Product teams looking for product feedback and insight into how users engage with their product.
- Marketing teams who want to send targeted messages to the right users at the right time based on their behavior i.e. based on real-time action performed by the user.
- Support teams who need a smarter solution than email to provide better support to their customers for resolving problems.
- Customer success teams that want a simple CRM that provides live user data and direct, personalized communication.
One should go through the Intercom Glossary before start working with Intercom so that you are friendly with terms used in Intercom.
Create Account on Intercom:
- Go to Intercom SignUp.
- Fill Up the Form and create the account.
- Next, start your free trial.
- Here’s how your free trial works:
- You’ll get a 14 day free trial of each product, which you can start at any time.
- After your free trial ends, Intercom’s products start at $49/month.
- If you cancel within the first 14 days you won’t be charged.
Setting up new Workspace for Project:
- Log in with your credentials to Intercom.
- Goto Create Workspace.
- Fill up the details and create a new workspace.
Intercom setup for Project in Python:
Introduction to API:
- Python-Intercom is the link to Intercom API for Python.
- Please note that this is NOT an official Intercom SDK.
- As it was being used by some Intercom customers they offered to host it to allow the current Python community to continue to use it.
- However, it will not be maintained or updated by Intercom. It is a community maintained SDK. Please see here for the official list of Intercom SDKs
- pip install python-intercom
Setting up your Personal Access Token for Intercom in Project:
- Intercom provides you with an Access Token as soon as you create an app on your workspace.
- You can find your Access Token in the Configure>Authentication section in your app within the Developer Hub.
- Copy this token and set it in the Environment Variables in the settings of your project, so that you can access it by importing settings. Below is an example of it.
How to use and work with Intercom in your Project:
- First of all import settings and set get intercom from the personal Access Token of Intercom.
- A user in Intercom is the person who is active over your website or project and doing some activities.
- Users can be created using intercom.users.create command along with some values for built-in attributes of Intercom User.
- You can also find and iterate over the intercom users. Also an intercom user can be deleted using intercom.users.delete().
- A lead-in Intercom is a person who is the only visitor over your website or project. The user is not performing any activities just moving around the website.
- Leads can be created the same as a user, using intercom.leads.create command.
- intercom.leads.delete() will delete the intercom lead from the intercom.
- Custom Attributes:
- Additional or custom attributes can also be set for a user or lead.
- Custom Attributes is a dictionary over the intercom, so here key will be your attribute name and value for that key is the value you want to set for that attribute.
- Events in Intercom is something action performed by a user over your website or project.
- Events can be registered for the user as well as for lead.
- There is one field named metadata for event which can be used to send more details for that event.
- order_date: a Date (key ends with ‘_date’).
- stripe_invoice: The identifier of the Stripe invoice (has a ‘stripe_invoice’ key)
- order_number: a Rich Link (value contains ‘url’ and ‘value’ keys)
- price: An Amount in US Dollars (value contains ‘amount’ and ‘currency’ keys)
- Below is the example for it:
Consulting is free – let us help you grow!
I am a Python developer. I am enthusiastic and always excited to learn new things. Fond of eating, doing adventurous activities.
Choose Your Language
Subscribe to Our Newsletter
- Digital Marketing
- IT Consulting
- Project Management