Inspiration

The My Social Seller(MSS) mission is to make better chatbot than human professional seller. MSS makes social selling the simplest way to offer the products and services with the Facebook native offer.

What it does

MSS solution consists of two chatbots. First one is the seller assistant. MSS Seller bot makes offer on the Facebook. On the other hand the customer bot serves the offer (MSS Service ). The client click the offer on the Facebook and MSS answers clients question by Messenger, get order details and so on.

MSS provides some standard business chatbot type:

Sell my product - The chatbot is focused on a product sales, it can serve items like shoes, dress, chair, etc.

Sell my service - The chatbot is focused on a services, it can serve services like hairdressing service or visit to the dentist. It will be inegrated with services like Google Calendar.

Give me sales leads - The chatbot collect client data like phone number, email of files.

In the future MSS plan develop fintech, insurence and real estate market bots also. All the bots are served by MSS Service chatbot it's one chatbot endpoint to all the offers published by MSS.

My Social Seller makes chatbots which can substitute professional sellers, call-centre workers, personal assistants and many others. They have AI (Artificial Intelligence) which let them to learn the best way to sell the product, they have got also original neural network and can use NLP (Natural Language Processing). Using them You can sell the product straight from the Social Media, create personalized offer, make an appointment and many others. Seller chatbot create the offer on facebook by native facebook API. Users can share it with a friends or promote by Facebook Ads (in the future we will integrate MSS with Facebook Ads. Seller bot could use Facebook Ads to target user group of the offer and match the best dialog scenario for the group).

MSS resolvs problem for Client and small business. Many of people who want to sell products by Internet, don’t know how to create and promote their websites or even don’t have any, because it is too difficult for them. On the other hand they have profiles on Facebook with FanPages and uses Messenger so that MSS chatbot could help them to get the first step to building an e-commerce business.

My Social Seller is much more easier for users than standard market proposal like E-buy, Shoplo. MSS After only a few question and sending a photo MSS makes Your own offer which is shown on My Social Seller fanpage, seller fanpage (eventually on other social media). You have got also constant contact with customers in real time via the most popular Messenger

How we built it

My Social Seller solution is build with AWS Lex and other Amazon Web Services like Lambda, DynamoDB, SES and Amazon Rekognition. MSS cloud system is hosted on EC2. We create it using AWS SDK for Java.

My Social Seller chatbot use Guava library to build network with the scenario of client interaction. MSS innovation is that the scenario graph is dynamics structure like neuron network (btw. it use neuron network ).

// MSSSellerSession - it's main class for create chatbot seller logic. 
    MSSSellerGraphCreator graphCreator = new MSSSellerGraphCreator(meetingEdgeFactory);
    graphTraversa = new GraphTraversal<String>(graphCreator.createGraph(), graphCreator.getRoot());
    graphTraversa.start(); 

// we create graph that way

class MSSSellerGraphCreator - build a graph structure scenario

class GraphTraversal - is used for travelers over the graph structure

The graph structure is created in createGraph method:

// the graph is build programmatically
 public MutableNetwork<Vertex, Edge> createGraph() {
    Vertex lexBotVertex = getPutAnswerVertex();
    Vertex lexExit = getExitVertex();
    Vertex fileContent = getFileVertex();
    // L0
    network.addEdge(root, lexBotVertex, vertextFactory.createConsumeInputProxy());
    network.addEdge(lexBotVertex, lexBotVertex, vertextFactory.createSlotNotCompleteEdge());
    // L1
    network.addEdge(lexBotVertex, fileContent, vertextFactory.createFileEdge());
    // L1->L0
    network.addEdge(fileContent, lexBotVertex, vertextFactory.createSlotNotCompleteEdge());
...
    return network;
  }

Every message goes to the GraphTraversal and make a move in MSS chatbot state machine. In main graph we use String type to goes from one vertex to another but some vertex could have also graph structure inside. Deep inside MSS graph we use adapter to use other service (like AWS Lex) which change String in complex object with additional NLP data (PostTextResult).

// MSSLexVertexImpl 
// messages are process by LexMessageAdapter which use AWS Lex API
messageAdapter = new LexMessageAdapter();

    MSSLexGraphCreator subSystemGraphCreator = new MSSLexGraphCreator(vertextFactory, vertextFactory.getEventBus(), vertextFactory.getContext().getContext());
    graphTraversa = new GraphTraversal<PostTextResult>(subSystemGraphCreator.createGraph(), subSystemGraphCreator.getRoot());

MSS Lambda

MSS get images from the user and process it to create the Facebook offer. It need to process image from the Seller bot to create watermark and properly dimension of the picture. Lambda do great job. We put there servie to make image processing and drop CPU utilization from core EC2 which serve the Messenger webhook.

// LambdaFunctionHandler - get Lex bot file data and produces offer images. 

@Override
  public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {
    String offerFilesString = getOfferFiles(input);

    LexInputBean lexInputBean = gson.fromJson(offerFilesString, LexInputBean.class);
    OfferFiles offerFiles = createFilesS3Upload(lexInputBean);
    FilesS3Upload filesS3Upload = new FilesS3Upload(offerFiles.getContext());
    Set<String> filesMetaData = filesS3Upload.processMetaFileData(offerFiles.getFiles());

    LexOutputBean lexOutputBean = new LexOutputBean();//lexInputBean.getCurrentIntent().getSlots()
    lexOutputBean.addSessionProperty(MSSBotConstants.FILE_META_SESION_ATTR, setToPipe(filesMetaData));
    lexOutputBean.addSessionProperty(MSSBotConstants.FILE_SESION_ATTR, setToPipe(offerFiles.getFiles()));
    lexOutputBean.addDialogProperty(MSSBotConstants.DIALOG_TYPE, MSSBotConstants.DIALOG_VAL);
    lexOutputBean.addDialogProperty(MSSBotConstants.FULFILLMENT_TYPE, MSSBotConstants.FULFILLMENT_VAL);
    String outputFiles = gson.toJson(lexOutputBean).toString();

    output.write(outputFiles.getBytes());
  }

MSS Lex Bot

MSS use a few Lex bot in one chatbot (ex My Social Seller). Our graph model interact with AWS Lex by API in some vertex. For example when we get the offer we select chatbot type to servs the offer and thet is the place when we decide which Lex bot we use. We do it in runtime/in the bot session. The hudge advantage of AWS Lex is simplisiti of creating chatbot scenario. Even our Sales Manager could build it, programatic skils are not required. It's important for us that developers run scenario in some point of the conversation, but content is provide by our marketing team&sales.

Accomplishments that we're proud of

MSS chatbots base on graph model which is similar to neuron in the neuron network. We create unique structure with AWS Web Services which is used on some vertex of MSS chatbot graph. The Vertex is like a state. It is combined with the edges that is variant of our state machine.

ps:The MSS is the first our project with Lex and Lambda services we are proud that we manage to setup the services in a short period of time

What's next for My Social Seller (MSS)

There are three important challenges for us in next 12 months:

  1. First we've got to raise finance from the investor (we are still looking for) or PARP (Polish Agency Developing Company- we are after demoday, waiting for decision). This is necessary to focus on product and employ more developers.
  2. We've got to improve our product. We would like to have many standard bots, which can be used by users without implementation in a cloud model. All of them should learn in very simple way, almost like human (for example if You tell Seller bot to react in special way even in spoken language he should do it during next conversation).
  3. Right now MSS is minimum viable product. In the next 3. month we plan start with the service.

My Social Seller(MSS) link

Built With

Share this project:
×

Updates