Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Did you know you can build a lead form for your website, so your leads can all go into CostCertified?

Important note

  • We have implemented a standard and automated spam/bot/spider filtering system. After making a request, your leads/potential clients will be routed to an intermediary page that will ask them to mark a checkbox, and then the lead will be fulfilled. Implementing reCaptcha is no longer necessary. This is what your leads will see:

...

Submit a lead via API endpoint

  1. Get your endpoint URL. Every lead-rotation has its own endpoint URL specifically for api-routed submissions. o it It is important you get the one that is generated in the code snippet from the Generate code snippet tab from the lead rotation window. You can find it underneath the generated form snippet on the lead rotation panel:

    Image RemovedImage Added
  2. Once you have the endpoint you can generate a curl request manually, or route to that address from Zapier or IntegromateMake (Integromat), or directly from your own code or platform. Here are some examples using curl (bash) or fetch (javascript).

    1. CURL - You can also just include other key:value pairs if sending the data via CURL. Replace {your endpoint url from form code snippet generated} with your endpoint url.

      Code Block
      curl '{your endpoint url from form code snippet generated}' --data-raw 'lead_rotation_id=2989995&activity_desc=New+request+comments&user_fname=John&user_lname=Smith&user_email=johnsmith%40smith.com&user_phone=4035555555'
    2. FETCH - From javascript you can programatically send a lead by copying the endpoint URL from the form snippet and implementing the following script using the official fields. Replace {your endpoint url from form code snippet generated} with your endpoint url.

      Code Block
      fetch("{your endpoint url from form code snippet generated}", {
        method: "POST", 
        body: JSON.stringify({
          user_fname: 'John',
          user_lname: 'Smith',
          user_address: '123 Pine Street',
          user_postal: '12345',
          user_city: 'City Name',
          user_email: 'email@email.com',
          user_phone: '12345678910',
          activity_desc: 'I would like a highly accurate quote on a renovation in record time!',
          customField1: 'My custom field value',
          customField2: 'My custom field value 2',
        })
      }).then(res => {
        console.log("Request complete! response:", res);
      });