Was this page helpful?

Atollon Web Leads


    Atollon Web Leads capture is set of tools that enable integration of any web site with ASP (Atollon Server Platform).

    Use Case

    Capture new contact

    You want to add the contact form on your web site that directly creates Individual / Business contact on your Atollon Server Platform.

    Capture new Individual contact

    When creating the Individual contact, the following system entities are created:

    • person contact - system is looking for similar contact based on mobile number or email; if found, no new contact is created
    • person folder - is created if person contact is created

    To create person contact, fill personal contact details + choose Person Contact Type (template) in form. The sample PHP form is listing person contact templates. If template includes reference to User Template, new system User is created automatically. Currently, e-mail address is used as user name. For future there should be option to select whether e-mail or mobile is used as User Name.

    System user is added as responsible person of created folder.
    If you want to get information about new individual contacts, create report for new Contact Folders with source from Web.

    Capture new Business contact

    When creating the Business contact, the following system entities are created (for special cases, see Detailed description):

    • person contact (system is looking for duplicity based on mobile number or email)
    • company contact (system is looking for duplicity based on company name)
    • company folder (system creates the folder once it is not existing)

    Detailed description:

    • If similar person contact found (by email or mobile), id of this found contact is returned and no new contact is created.
    • Similar person contact is checked if it has defined employer. If defined, this employer's id is returned and no new company contact is created.
    • If at least company name is inserted, similar company is searched for (by company name). If found, id of this found company is returned and no new company is created.
    • If similar company contact has folder, id of this folder is returned and no new folder is created.
    • If company name is not inserted and contactType=Business is specified in request, folder of similar person employer is returned if this employer is found. If employer has no folder, it is created. If no employer is found, folder id is taken from defaultFolderId sent in request - so defaultFolderId is required only in cases when contactType=Business is sent in request and it is possible that no company name is sent (if no company name is inserted and contactType is no specified, Individual contact type is chosen automatically).

    Person is bound to company (relationship employer-employee between company and person is created).
    System user is added as responsible person of created folder.
    If you choose "Use company address" (useCompanyAddress=Yes), created person-employee will share the same address as company.
    If you want to get information about new company contacts, create report for new Contact Folders with source from Web.

    Capture new Sales Opportunity (optional)

    You want to create project (sales opportunity) to either new or existing system contact (Folder).

    • New project is named as chosen project template
    • System user is added as responsible person of created project
    • Person from request is added as external contact of project

    If you want to create project to an existing system contact send name of company or mobile number or email of person, these parameters are compared with system contacts to find similarities.
    If you want to get overview about new projects (opportunities) from web, create report for projects (type: Sales Opportunity), sort it by date created (desc).

    PHP scripts configuration


    • Web Leads can be used with PHP scripts downloadable below which generates HTTP GET request
    • extensions enabled in PHP server configuration file:
      • php_soap
      • php_openssl
      • php_curl
    • "KeepAlive On" enabled in Apache server configuration file - usually httpd.conf
      • if KeepAlive is off, you will never get response, it will stuck on first CreateSimpleContact function
    • to know correct atollon server domain name or IP address, server instance name, username and password
      • to set in sample PHP script config.php downloadable below

    Sample PHP scripts:

    • you can use this php scripts to generate appropriate GET request
    •  index.php - php with functions for server, in most cases no editing is needed in this php
    •  form.php - generates sample html form with usage of functions from index.php
    •  config.php - server login, HTML/SOAP response, email settings etc.

    You can download example scripts here.

    Sample implementation:

    Parsing response to custom HTML

    • for possibility of parsing response, request must contain htmlResponse=Yes and referrer (look at usage in sample form.php)
    • referrer is URL of web site (php script) which can accept and parse response - sample index.php sends URL of itself, so response is returned back to this php
    • what to displayed after success response is in function success_response() in config.php, for failure response is function failure_response()
    • if you want to send email or sms (person's email and mobile filled in form is used):
      • you need to specify name of template ($emailTemplate, $smsTemplate) and sender of email ($emailFrom) in config.php
      • template specifies subject and body of email
      • if you don't want to use template, you can insert text directly into index.php (instead of $messageTemplateBody and $messageTemplateSubject)
      • for sending email is function send_email() and for sms send_sms() both defined in index.php
      • MESSAGETEMPLATESNODE must be set in system (for Atollon consultants preparing ASP)
      • with sending email, notice about this sent email is sent automatically to responsible user of folder or project (project - when created)
      • send email/sms is binded to folder or project (project - when created)
    • for sending notice to responsible user, use send_notice() function
      • this notice contains noticeContent and has noticeSubject both sent in request
      • when noticeSubject is not sent (only noticeContent), $defaultNoticeSubject is taken from config.php as subject of notice
      • if project is created, notice is sent to responsible user of project, otherwise notice is sent to responsible user of folder

    Returned values in response

    On success:

    • result - always string "OK"
    • contactType - ["Business"/"Individual"]
    • personId - id of person contact in system
    • personType - ["created"/"found"]
    • companyId - id of company contact in system; empty string in case of Individual contact or Business contact with no company sent in request
    • companyType - ["created"/"found"/"employer"/""]; empty string in case of Individual contact or Business contact with no company sent in request
      • found: id of similar company returned
      • employer: id of employer of similar person
    • folderContact - ["person"/"company"/"employer"] - on what contact is created/found folder
    • folderType - ["created"/"found"/"default"]
      • default: defaultFolderId from request is returned - when contactType=Business is specified and no employer of person is found in system
    • folderId - id of folder in system
    • projectId - id of created project; empty string in case of not sending createProject=Yes in request
    • personEmail, personMobile, personFirstName, personSurname, companyName - values sent in request, possible to use for sending email or sms
    • noticeSubject, noticeContent - values sent in request, by calling function send_notice(), notice will be sent to responsible user of folder or project (if created)

    On fail:

    • result - always string "FAIL"
    • reason - always string "Mooring server raised error", added because some SOAP services requires reason parameter
    • message - description what is wrong
    • source - where exception raised

    Specifications of request

    • if you don't send address type ("Address type" combo box in sample php form), invoice type will be chosen automatically (type with parameters invoiceAddr=1 AND (personAddr=1 OR companyAddr=1) must be set on server)
    • if you don't send folder template ("Person/Company Contact Type" in sample php form), first suitable from all folder templates will be chosen automatically
    • if you want to create form only with fields for person contact and for creating project (no fields for company), but you need to create project on company folder, send contactType=Business in request (with defaultFolderId) - employer of person will be looked for in system; if no employer is found, defaultFolderId is used
    • if you send createProject=Yes ("Create project" radio buttons in sample php form), project template is required to send in this case ("Project type" combo box in sample php form)
    • required parameters for sending new WebLeads request:
      • server
      • session
      • system user id (hidden input userId) - from get_session() in index.php - used for setting this user as responsible person of folder
      • person name (PERSON.name3) and surname (PERSON.name1) - if not inserted, fail response is returned only if no similar person found comparing mobile and email
      • company name (COMPANY.name1) - required only if you want to create Business contact (in case of empty company name and not specifying contactType=Business in request, Individual contact will be created)
    • person and mobile are not required, but if you want to ensure comparing filled person with those existing in system, check if some of these two parameters are filled before submitting form (in sample form.php made by JavaScript? on person e-mail by adding id="required")
    • projectTemplate parameter must be sent in format id:name (made by function list_project_templates() in index.php) - name of template is used as name for project
      • or you can get id of project template from name of template by using function get_project_template(), which uses template name variable $projectTemplate from config.php - in this case you need to create format id:name by yourself - for example:
        <input name="projectTemplate" type="hidden" value="<?php echo get_project_template().":".$projectTemplate; ?>"/>

    sample GET request (generated by submitting filled sample php form) - creating Business contact with project :


    Sample response - SOAP format

    • returned if htmlResponse is not equal to 'Yes' or completely missing in request
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
          <atollon:CreateSimpleContact xmlns:atollon="http://atollon.com/enterprise/wsdl"> 
            <noticeSubject>New registration</noticeSubject>
            <noticeContent>Send mi offer, please. Bouda</noticeContent>

    Sample response - HTML format parsed by php

    • if htmlResponse=Yes and referrer are sent in request
    • server returns response with parameteres in GET format to PHP with URL defined in referrer
    • parsed response in browser can be:
      <html><head><title>Create contact</title></head><body><span style="font-size: larger; font-weight: bold; color: green;">Contact SUCCESSFULLY created! Thank you.</span>
      <br>Sending email to test@atollon.com</body>

    How to get URI

    Sample of Atollon Web Services URI:


    you can test it on browser and you will see:


    Deployed Services


    Atollon services

    Available Operations

    • CreateDistributionGroup

    • ListActivityTemplate

    • CreateCurrencyRate

    • GetWorkflowSetup

    • GetMailbox

    • UpdateDistributionGroupCategory

    • ListCandidateLanguages

    • ListProjectItemsCovering

    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    8654 view(s), 5 edit(s), and 16815 character(s)


    Viewing 1 of 1 comments: view all
    I had a problem when creating the folder and including php files saying:

    You don't have permission to access /partner/WebLead/ on this server.

    I think that might be permission of the user that runs apache on this folder, but I still dont know.
    Posted 20:50, 25 Nov 2010
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Attach file