Instructions on how to activate the contact form - System CRM i oprogramowanie ERP Firmao

Instructions on how to activate the contact form

Contact form integrated with the Firmao system allows our client to contact our company. In the form, the customer provides information such as name and surname (or company name), their e-mail address and the content of the message. Submitting the contact form involves automatically adding a new company to the Firmao system, which data (name, email address and description) will be taken from the form completed by our client.


How to enable the contact form service in the Firmao CRM system?

To add a contact form to our website, we need to add a PHP script to our website, i.e. insert the code below with the completed fields login_api, password_api and COMPANY_ID.

<?php
if (isset($_POST['name'])) {
   $usr = base64_encode("login_api:password_api");
   $url =  "https://system.firmao.pl/COMPANY_ID/svc/v1/customers";
   $content = array(
   "label" => $_POST['name'],
   "name" => $_POST['name'],
   "emails" => $_POST['email'],
   "description" => $_POST['message']);
   $json = json_encode($content);
   $curl = curl_init($url);
   curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
   curl_setopt($curl, CURLOPT_HEADER, false);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
   curl_setopt($curl, CURLOPT_HTTPHEADER,
   array("Content-type: application/json; charset=UTF-8", "Authorization: Basic $usr"));
   curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
   $json_response = curl_exec($curl);
   $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
   if ( $status != 201 && $status != 200) {
    die("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ",     curl_errno " . curl_errno($curl));
   }
   curl_close($curl);
   $response = json_decode($json_response, true);
   echo "Thank you for contacting us.";
} else {
?>
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css" >
	<div style='padding: 20px; max-width: 800px;'>
        <form method="post">
            <div class="form-group">
                <label for="name">Name</label>
                <input type="text" id="name" name="name" class="form-control" placeholder="Name" >
            </div>
            <div class="form-group">
                <label for="email">Email</label>
                <input type="email" class="form-control" name="email" id="email" placeholder="jan.kowalski@firmao.com">
              </div>
            <div class="form-group">
                <label for="message">Message</label>
                <textarea class="form-control" name="message" id="message" rows="3"></textarea>
              </div>
            <button type="submit" class="btn btn-primary">Send</button>
        </form>
    </div>
<?php } ?>

Important! Instead COMPANY_ID we must enter our company’s ID visible in the browser’s address bar.


API login and password can be found in company settings in the “Integrations” tab. We have to select “API” from the top menu and then copy the login and generate a new password.

Tip: We can freely modify the script for creating the contact form. To obtain information about field codes, we can contact the Firmao support department by e-mail: contact@firmao.io.

How does the contact form functionality work?

Thanks to this functionality, a potential customer will be able to contact us by without calling, by simply clicking the “Send” button. 

In the Firmao system, a new customer will appear along with the completed e-mail address and a description that includes the customer’s message.

Advantages of using contact forms:

  • Easy communication – contact forms allow users to quickly and easily submit inquiries, opinions or problems,
  • Control over your data – contact forms allow website owners to control the information that is collected from users, which allows for a better understanding of their needs and expectations,
  • Professionalism – the presence of a contact form on the website proves professionalism and attention to customer needs, which can contribute to building trust and credibility of the brand,
  • Availability 24/7 – contact forms are available 24 hours a day, which allows users to send messages at any time, regardless of customer service work hours.
O tym piszemy w artykule:

Try your free account


I have a promo code
By registering you accept Terms and Conditions of Firmao. Pricing specification.


Free presentation



preview