Fonnte mainly focus on developing submission for better support to developer and non-developer so it can be used more easily.

No country code support

If your target is not only on a country, the default fonnte's country code will be a problem.

We have adjusted to enable an option to disable this by adding support to 0 on the field "countryCode" => "0".

The downside for using it is, fonnte no longer will take care of your country code number.

Use it only when needed.

Export submission

You can now download the submission list

Notify admin on submit

On successful submission, admin will get notified.

you can also use rotator on the target.

Webhook submission

You can receive the submission data for your system by using webhook submission.

Save submission to group

The submission sender can now be saved on a group for future usage.

Add button text support on webhook

We add support for button text on webhook for easier usage, if needed.

You can use $text to get the button text.

Bugs and fixes

fix submission button answer on review list

fix incorrect file limit on dashboard

You can get the submission data using webhook with javascript.

const express = require("express");
const app = express();
app.use(express.json());

async function sendFonnte(data) {
  const url = "https://api.fonnte.com/send";

  const customHeaders = {
    "Content-Type": "application/json",
    Authorization: TOKEN ,
  };

  const response = await fetch(url, {
    method: "POST",
    headers: customHeaders,
    body: JSON.stringify(data),
  });
  console.log(await response.json());
}

app.post("/submission", function (req, res) {
  console.log(req.body);
  const data = {
      target: "082227097005",
      message: "webhook submission working great!",
    sendFonnte(data);
  } 
  res.end();
});

app.listen(3000, function (err) {
  if (err) console.log(err);
  console.log("Server listening on PORT", 3000);
});

Available parameter

When a client submit their submission, you can get the data and save it to your own system or do anything with it.

Copy and use it however you like on your system.

<?php
header('Content-Type: application/json; charset=utf-8');

$json = file_get_contents('php://input');
$data = json_decode($json, true);
$sender = $data["sender"];
$submission = $data["submission"];
$name = $data["name"];
$list = $data["data"];     


function sendFonnte($target, $data)
{
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.fonnte.com/send",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_POSTFIELDS => array(
            'target' => $target,
            'message' => $data["message"],
        ),
        CURLOPT_HTTPHEADER => array(
            "Authorization: TOKEN"
        ),
    ));

    $response = curl_exec($curl);

    curl_close($curl);

    return $response;
}
$reply = [
    "message" => $json
];
sendFonnte("082227097005", $reply); //change number to your own number

Available parameter

You can download the attachment sent to your device using webhook.

This function will only working on device with all feature package.

Special note : any autoreply feature won't work if you are using webhook.

const fs = require("fs");
const express = require("express");
const app = express();
app.use(express.json());
app.use(express.static("public"));

app.post("/webhook", async function (req, res) {
  console.log(req.body);
  const response = await fetch(req.body.url);
  const result = await response.arrayBuffer();
  fs.writeFile(`./public/file.${req.body.extension}`, Buffer.from(result), (err) => {
    if (err) console.log(err);
  });
  res.end();
});

app.listen(3000, function (err) {
  if (err) console.log(err);
  console.log("Server listening on PORT", 3000);
});

If your attachment have message with it, you can find it in req.body.url.

The attachment will be downloaded and saved in the public folder.

To save somewhere else, determine the path where the attachment should be saved.

Note: The attachment will follow file limitation rules. if you are receiving an attachment outside file limitation rules, you will not receive it on your webhook.

Using webhook will enable your device to respond on incoming message with dynamic response.

We will use express for easier usage.

Special note : any autoreply feature won't work if you are using webhook.

const express = require("express");
const app = express();
app.use(express.json());

async function sendFonnte(data) {
  const url = "https://api.fonnte.com/send";

  const customHeaders = {
    "Content-Type": "application/json",
    Authorization: TOKEN ,
  };

  const response = await fetch(url, {
    method: "POST",
    headers: customHeaders,
    body: JSON.stringify(data),
  });
  console.log(await response.json());
}

app.post("/webhook", function (req, res) {
  console.log(req.body);
  if (req.body.message == "test") {
    const data = {
      target: req.body.sender,
      message: "working great!",
    };
    sendFonnte(data);
  } else {
    const data = {
      target: req.body.sender,
      message: "this is default reply from fonnte",
    };
    sendFonnte(data);
  }
  res.end();
});

app.listen(3000, function (err) {
  if (err) console.log(err);
  console.log("Server listening on PORT", 3000);
});

Available parameter

Replying using attachment is only available on devices with a package of super, advanced or ultra.

Forward Rotator

We are adding rotator option for the the recipient.

You can forward incoming message or split the leads when a client fill a form using API.

Forward message

You can now use full power of autoreply fonnte.

Similar to forward rotator, you can now forward incoming text to a specific number.

You can only forward on default message.

It's pointless to forward text which is the same as keyword.

Partnership

Fonnte adding a menu to make a partnership with you.

This is an opportunity for you to make more clients and more money.

Your product / service will be shown at partner's page.

But this is limited to a product/service which require their clients to use their own token.

Bugs and fixes

add autoresend to group when failed.

fix missing validation on button url.

fix autorepy button type.

Rotator is a feature that allows you to send messages randomly according to the weight of each number.

This feature primarily used to split leads from a form, button or another method.

You can use it for autoreply (default only) and send message (API only).

To create the rotator, you can go to rotator menu.

The fields of rotator is shown above.

After you finish adding the rotator, you can click add and the rotator will be added and ready to use.

You can use it on autoreply with default reply enabled or using rotator API as target with rotator id

This API will Get all of your rotator list.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.fonnte.com/rotator',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'Authorization: TOKEN'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

If you prefer to see on postman, see here.

TOKEN must be filled by your own token. See how to get token.

Response

Successfull response

{
    "data": [
        {
            "id": "rotator#1",
            "name": "1"
        }
    ],
    "status": true

-Unknown user : your username is invalid, try relogin

{
    "detail": "unknown user",
    "status": false
}

- Error fetching rotator : There is something wrong with the rotator data.

{
    "detail": "error fetching rotator",
    "status": false
}

- No rotator yet : You haven't create any rotator yet

{
    "detail": "no rotator yet",
    "status": false
}

Rotator

We are adding rotator option for the sender.

You can use multiple device/token to send to several target numbers, so it will randomize the sender and lower the chance of getting banned.

Submission menu

Submission menu is newly added feature.

This feature enable you to create a form that actually works on whatsapp.

You can get your customer data fast and easy.

Read more at submission documentation.

Additional webhook data

Fonnte sending more data to be used by your webhook.

Read more at webhook documentation.

Webhook download attachment

Now you can save the attachment that has been received by your whatsapp bot.

Note : the attachment will follow the file limitation rule and require device with all feature package.

Read more at download attachment documentation.

Random delay

Fonnte always use fixed delay to multiple target number which make the sending have a certain rhytm.

to make it more like human and less like bot, we are implementing random delay.

You can set delay 5-10 for example, the messages will be sent randomly between 5 to 10 seconds later and the delay keep stacking.

Bugs and fixes

fix schedule delay

fix case sensitive button reply

fix incorrect delay on schedule message

fix incorrect timezone on message history report

fix incorrect schedule status

optimize autorestart strategy

optimize connection state

optimize send message logic

You can make a form actually on whatsapp using this feature.

Submission feature work like button menu, it will be used on autoreply menu.

Most of the time, whenever you order something from small to medium business on whatsapp, you will be given a message like this :

Before you order, please fill the details below

Name :
Address :
Item :
Amount :

And then please re-send it after you fill it.

This submission feature will make the process easier for you and your customer.

Submission

First, make your own submission.

fonnte submission feature

The fields of submission is shown above.

Update 31/1/2023

The update allow on successful submission to be sent to admin.

you can send it to multiple admin or use rotator feature.

webhook can be used for receiving the submission data to your own system.

And you can save it to a group for future usage.

after you create the submission, the submission will be shown below.

You can see the list of your customer, edit and delete the submission.

note : deleting the submission will also delete the submission list.

Submission List

You can check the customer input by clicking the submission list button.

The heading is using the question name field.

That's why it's best to set the question name short.

You can delete the submission list.

We will add export feature later.

Made with in Indonesia