Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniela Facchinetti DanyF-github

View GitHub Profile
View blog.md

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
View block34.
{% 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>
View block33.
{% 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>
View block32.
{% 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">
View block31.
{% 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>
View block30.
{% 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 }}
View block29.
{% 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">
View block28.
{% extends 'base.html' %}
{% load static %}
{% block content %}
View block27.
{% 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>
View block25.
.container {
margin: 30px;
}
.link-group {
display: inline-flex;
column-gap: 20px;
}
a {