KB: Automatically Creating New Accounts for Web Site Visitors

From RangerMSP Wiki - PSA software for MSPs and IT services providers
Revision as of 19:25, 21 January 2010 by Reno (talk | contribs) (Created page with 'KB: Automatically Creating New Accounts for Web Site Visitors ==Introduction== Many businesses have a Web form on their Web site that is designed to capture the contact details o…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

KB: Automatically Creating New Accounts for Web Site Visitors

Introduction

Many businesses have a Web form on their Web site that is designed to capture the contact details of potential customers. The Commit Email Connector can help automating this process by automatically processing emails sent by your Web forms and creating new CommitCRM Accounts for them.

How does this work? Using the Commit Email Connector’s Advanced XML processing features, the system can receive emails containing XML transactions from a web form, and perform the actions requested in the transaction, on the CommitCRM database. Once an account is created in the system, the customer can submit his own tickets using the Commit Email Connector’s Email to ticket feature. The Email to Ticket feature helps by taking emails sent to your Public Email Address using the same email address they filled in the Web form. Commit Email Connector will identify them by their email and will open a new ticket for their email. You can learn more about this by reading more about the Email to Ticket feature here.

Web forms which are designed in standard (PHP, Perl, CGI, Etc.) web form formats allow you to gather different details from the person browsing the page, and turn them into script variables which can be automatically placed in the XML template in their correct place, and email the outputted XML transaction in plain text format to the Commit Email Connector, to be processed as a new customer.


Configuring the Commit Email Connector for XML Transactions

Instructions for configuring the basic settings for the Commit Email Connector’s API by Email can be found in this link. Once you’ve configured the API by Email feature, restart the CommitServer service in order for the changes to take effect.


New Account XML Transaction Sample

Editing the Script

The sample below creates a new account using the data passed to the system in the RecordData section of the script, with the following details in the account:

  1. Account Name.
  2. Contact Name.
  3. Phone Number.
  4. Email Address.

More information can be added to the script by adding more data to the RecordData section of the script. The XML tags for each CommitCRM Accounts field can be found in this link.

The changes to the script need to be made on the following lines:

Field Description
Line 5 Change youremail@yourdomain.com to the address you want the automated responses sent to.
Line 6 Change the-predefined-api-password to the API password configured in ServerConfig.exe
Lines 9-14 The web form variables should replace the text within the {} containers


Script Sample

 <?xml version="1.0" ?>
 <?commitcrmxml version = "1.0" ?>
 <CommitCRMTransaction>
  <ExternalApplicationName>WebsiteSignup</ExternalApplicationName>
  <SendResponseToEmail>youremail@yourdomain.com</SendResponseToEmail>
  <Password>the-predefined-api-password</Password>
  <ReturnTransactionID>data from external application (will be returned as-is in the response) 
 </ReturnTransactionID>
 <DataKind>ACCOUNT</DataKind>
  <RecordData>
   <FLDCRDCOMPANY>{Account-Name-Here}</FLDCRDCOMPANY>
   <FLDCRDCONTACT>{Contacts-First-&-Last-Name-Here}</FLDCRDCONTACT>
   <FLDCRDPHONE1>{Phone-Number-Here}</FLDCRDPHONE1>
   <FLDCRDEMAIL1>{Email-Address-Here}</FLDCRDEMAIL1>
  </RecordData>
 </CommitCRMTransaction>
 

Troubleshooting

If your script does not create a new account, please use this following test script to verify that the Commit Email Connector is receiving emails and processing XML transactions.

To test the Commit Email Connector, please follow these steps:

  1. Set the API password in ServerConfig.exe to “qwerty”, and restart the CommitServer Service.
  2. Copy the following Troubleshooting script to a blank Plain Text email message.
  3. Replace Your@emailhere.com (in the script) with your own email address for the log to be sent there.

If the script creates an account called XML Test, then this means that the problem is in your script. To troubleshoot script syntax errors, please enable XML responses in ServerConfig.exe, and set your script to respond to an email address you have access to (Line 5 of the script).

If the account has not been created, a log should be sent to the email address you placed in line 5 of the script. The log file should say the exact reason the account was not created for you to correct in the script.


Troubleshooting Script

<?xml version="1.0" ?>
<?commitcrmxml version = "1.0" ?>
<CommitCRMTransaction>
 <ExternalApplicationName>WebsiteSignup</ExternalApplicationName>
 <SendResponseToEmail>Your@emailhere.com</SendResponseToEmail>
 <Password>qwerty</Password>
 <ReturnTransactionID>data from external application (will be returned as-is in the response) 
</ReturnTransactionID>
 <DataKind>ACCOUNT</DataKind>
 <RecordData>
<FLDCRDCOMPANY>XML Test</FLDCRDCOMPANY>
<FLDCRDCONTACT>Abe Lincoln</FLDCRDCONTACT>
<FLDCRDPHONE1>+13235556767</FLDCRDPHONE1>
<FLDCRDEMAIL1>Abe@PresidentsClub.com</FLDCRDEMAIL1> </RecordData> </CommitCRMTransaction>


See Also

Commit Email Connector User Manual Commit Email Connector FAQ