After booking an appointment it is common for the external sales person to use a webpage to submit feedback on the result of the meeting. The way to do this is to include a dynamic link in an appointment notification email. This will use the API to show live information on the webpage (e.g. the company name and address), and also use another API function to submit the details back to the database.
The target for the link in the email would use the merge field for the Account Number and also the Database Area number, this means the right record will be updated when the form is submitted (without the Account Number the API will create a new record rather than updating one).
For example, the target URL for the link in the email could be like this:
Your webpage form can reside anywhere, it does not have to be on a FIVE CRM server, the example URL above is just to show the parameters (*account and the Database Area number 003). You can set up a webpage in the system by using the Menu option, Setup > Documents > Webpage.
The image below shows an example form. Note the customer details ("IBM" etc) which are populated dynamically.
Click here to view the source of the form.
The following lines fetch the account details and extract the returned XML into usable arrays:
$source = 'https://test.fivecrm.com/123456/api.php?mode=export&hash=<hash>&account='.$acct.'&area=' . $arnum;
$test = simplexml_load_file($source);
$info = $test->xpath("//*[CID=$cid]");
$info2 = $test->xpath("//RCMANL");
$info3 = $test->xpath("//TELRCM");
Where:
$info = Contact name fields
$info2 = Account additional fields
$info3 = Account details
Common database fields used in this form are:
Account fields
Fieldname for extracting data | Fieldname for webform submission | Description |
ACCOUNT | ACCOUNT-TELRCM | Account number |
COMPANY | COMPANY-TELRCM | Account / Company name |
ADDRESS1 | ADDRESS1-TELRCM | Address line 1 (eg Street address) |
ADDRESS2 | ADDRESS2-TELRCM | Address line 2 |
ADDRESS3 | ADDRESS3-TELRCM | Address line 3 (eg City / Town) |
ADDRESS4 | ADDRESS4-TELRCM | Address line 4 (eg State / county) |
POSTCODE | POSTCODE-TELRCM | Post / zip code |
COUNTRY | COUNTRY-TELRCM | Country |
TELEPHONE | TELEPHONE-TELRCM | Telephone |
OWNER | OWNER-TELRCM | Account owner |
SALESMAN | SALESMAN-TELRCM | Account salesman |
CUSTOMERSTATUS | CUSTOMERSTATUS | Account status |
SUBSTATUS | SUBSTATUS-TELRCM | Account sub status |
NEXTDATE | NEXTDATE-TELRCM | Account nextdate (depending on how the system is configured, this could be the next contact date, or the appointment date, click here for more information on configuring the appointment date) |
Account Additional Fields
Fieldname for extracting data | Fieldname for webform submission | Description |
ANAL01 | ANAL01-RCMANL | Additional field 01 |
ANAL02 | ANAL02-RCMANL | Additional field 02 |
Numbers 03 through 99 | ANALXX-RCMANL | Additional field XX |
ANAL100 | ANAL100-RCMANL | Additional field 100 |
Contact Fields
Fieldname for extracting data | Fieldname for webform submission | Description |
CID | CID-CONT | Contact ID |
CONTACT | CONTACT-CONT | Full contact name |
FIRSTNAME | FIRSTNAME-CONT | Contact firstname |
SURNAME | SURNAME-CONT | Contact lastname |
TELEPHONE | TELEPHONE-CONT | Contact telephone |
EMAIL-CONT | Contact email address | |
POSN | POSN-CONT | Contact job title |
ADDN01 | ADDN01-CONT | Contact additional field 01 |
numbers 02 through 59 | ADDNXX-CONT | Contact additional field XX |
ADDN60 | ADDN60-CONT | Contact additional field 60 |
Contact the FIVE CRM Customer Success Support desk to request other field-names to use for your particular web form.