Skip to content

Instantly share code, notes, and snippets.

View DanyF-github's full-sized avatar

Daniela Facchinetti DanyF-github

View GitHub Profile

In this article, you will learn how to build the core feature of a social CRM using Django and Vonage Messages API. Our social CRM will help sales agents and the customer support team communicate with potential customers directly on Facebook in real-time. Let's call it Sales Fox.

Pre-requisites

  1. Create a messages application from your Vonage dashboard. Follow the steps outlined here.
  2. Authorise Vonage to access your Facebook business page and link your application to your Facebook page. Follow the steps outlined here.
  3. Install Redis - If you're using Linux or Mac, follow the instructions here. If you're using Windows, follow the instructions here.
  4. Install Ngrok. Go to [Ngrok download page](ht
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{% static 'css/chat.css' %}">
<title>Conversation with {{lead}}</title>
{% extends 'base.html' %}
{% load static %}
{% block content %}
<h4>List of leads assigned to you</h4>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="message-{{ message.tags }}"{% endif %}>{{ message }}</li>
{% extends 'base.html' %}
{% load static %}
{% block content %}
<h1>Login to your dashboard</h1>
<form action="." method="POST">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Login">
{% extends 'base.html' %}
{% load static %}
{% block content %}
<a href="{% url 'agent:agent_dashboard' %}">Go to dashboard</a>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %}>{{ message }}</li>
{% extends 'base.html' %}
{% load static %}
{% block content %}
<a href="{% url 'lead_manager:lead_list' %}">Go to lead list</a>
<h1>Lead Creation Form</h1>
<form action="." method="POST">
{% csrf_token %}
{{ form.as_p }}
{% extends 'base.html' %}
{% load static %}
{% block content %}
<a href="{% url 'agent:agent_dashboard' %}">Go to dashboard</a>
<h4>List of leads</h4>
<ul>
{% for lead in leads %}
<li class="list">
<div class="link-group">
{% extends 'base.html' %}
{% load static %}
{% block content %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<title>{% block title %} Sales Fox {% endblock title %}</title>
.container {
margin: 30px;
}
.link-group {
display: inline-flex;
column-gap: 20px;
}
a {