How to integrate your custom CRM on Popin?

How to integrate your custom CRM on Popin?

Guide for API Integration with Popin

Welcome to the integration guide for the Popin! To enable seamless communication between your e-commerce website and our system, you need to provide two APIs:

  1. Lead Submission API - This API will allow us to pass lead information from the widget to your system.
  2. Event Tracking API - This API will allow us to pass updates about the lead’s interactions and actions back to your system.

Please follow the steps below to set up these APIs and integrate them with our system.


1. Lead Submission API

Purpose

To transfer lead details collected through the widget on your website to your system.

Requirements

  1. An HTTP endpoint (e.g., https://yourdomain.com/api/leads).
  2. The endpoint should accept POST requests with the lead details in JSON format.
  3. Ensure proper authentication (e.g., API keys, tokens) to secure the endpoint.

Request Format

HTTP Method: POST\ Headers:

  • Content-Type: application/json

Body Example:

{
  "name": "John Doe",
  "email": "john.doe@example.com",
  "phone": "+1234567890"
}

Response Format

Success Response Example:

{
  "status": "success",
  "customer_id": "67890"
}

Error Response Example:

{
  "status": "error",
  "message": "Invalid data format."
}

The customer_id provided in the success response will be used in the Event Tracking API.


2. Event Tracking API

Purpose

To send event updates for leads (e.g., when a lead opens an email, clicks a link, or makes a purchase).

Requirements

  1. An HTTP endpoint (e.g., https://yourdomain.com/api/lead-events).
  2. The endpoint should accept POST requests with event data in JSON format.
  3. Ensure proper authentication (e.g., API keys, tokens) to secure the endpoint.

Request Format

HTTP Method: POST\ Headers:

  • Content-Type: application/json

Body Example:

{
  "customer_id": "67890",
  "event_name": "call_completed",
  "event_details": {
    "duration": 300,
    "url": "https://yourwebsite.com/product/2312"
  }
}

Response Format

Success Response Example:

{
  "status": "success",
  "message": "Event recorded successfully."
}

Error Response Example:

{
  "status": "error",
  "message": "Event name not recognized."
}

Security Recommendations

  1. Use HTTPS for all endpoints to encrypt data in transit.
  2. Validate incoming data to prevent malicious input.
  3. Monitor API usage to detect and prevent misuse.

Integration Steps

  1. Set Up Endpoints: Create the above API endpoints in your backend system.
  2. Share API Details: Provide us with the following information for each API:
  • Endpoint URL
  • Authentication method (e.g., API key, token)
  • Example request and response for testing
  1. Test the Integration: We will test the APIs with sample data to ensure they work as expected.

Contact Us

If you have any questions or need assistance with the integration, please reach out to our support team at [support@popin.to].

We look forward to helping you get started with Popin!