Skip to main content

ContactFormRequest Service

Description

This service is used to simplify entering basic web forms into Atollon. In Atollon, it's possible to add more complex business logic based on request type and it's parameters. Web developers are let go of understanding Atollon blacbox.

Request

POST https://<HOST>/crab/contact_form/<request_type>

Request Types

Lead

https://<HOST>/crab/contact_form/lead

POST data in JSON format:

{
    "person": {
        "name": "<jmeno>",
        "surname": "<prijmeni>"
    },
    "company": {
        "name": "<nazev_firmy>",
    },
    "contacts": {
        "email": "<email>",
        "phone": "<telefon>"
    },
    "comment": "<text_pozadavku>",
    "interested_in"interestedIn": ["<p1>"," <p2>"," ..." ],
    "lead_category"leadCategory": "<string>",
    "trackingCode": "<string>"
}

Function progress

  • When above request is sent, new TIF is created (TIF = Temporary Import File) and the contents is saved in TIF; TIF type = contactform-lead
  • Contact form that is not processed has TIF.status = 1
  • The plugin calls auto-processing that makes the following steps:
    • Company is filled? => lead is "Company lead" (and the person is representative of the company), otherwise it's "Person lead"
Company lead
  • Check whether company is existing (company name matches some record in DB) // see: https://help.atollon.com/books/backend-development/page/modcontact#bkmrk-%C2%A0
  • If company does not exist, create new contact (company)
  • With company contact id, check whether contact has the desired contact folder. Desired contact folder is folder with FPATypeCategory = com.atollon.leads.fpatypecategory.lead OR optional lead_category (represents FPATypeCategory of the lead folder type). If the lead folder does not exist, it is created.
  • Check whether person is existing (based on e-mail, mobile / if these are not filled-in, the person is created anyway). E-mail and mobile is stored with person contact
  • Comment is created as message and stored with lead folder ID // Subject: "New lead " & {{ firstName }} {{ lastName }}, {{ companyName }}
  • Interested in - represents contact group. Find the contact group with the same name. If the contact group does not exist, create it in "Interested in" category. Assign the contact to the group
Person lead
  • The main difference from company lead is that the lead ID is searched / created for the person contact (because company contact is missing)

After the request is imported successfully, change the TIF status to "2".