KB: Automatically Creating New Accounts for Web Site Visitors

From RangerMSP Wiki - PSA software for MSPs and IT services providers
Revision as of 08:46, 8 July 2020 by Dina (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

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

How does this work? Using the RangerMSP 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 RangerMSP database. Once an account is created in the system, customers can submit their own tickets using the RangerMSP 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. RangerMSP Email Connector will identify them by their email and will open a new ticket for their account. 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 pages, 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 RangerMSP Email Connector, to be processed and then added as a new customer.


Configuring the RangerMSP Email Connector for XML Transactions

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


New Account XML Transaction Sample

Editing the XML

The sample below creates a new account using the data passed to the system in the RecordData section of the XML, 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 XML by adding more data to the RecordData section of the XML. The XML tags for each RangerMSP Accounts field can be found in this link.

The changes to the XMLneed 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.
Please Note that the XML password feature is optional, and we only recommend using it to avoid unwanted XML transactions from affecting your Database.
Lines 9-14 The web form variables should replace the text within the {} containers


XML Sample

 <?xml version="1.0" ?>
 <?RangerMSPxml version = "1.0" ?>
 <RangerMSPTransaction>
  <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>{Web-Form-Account-Name-Here}</FLDCRDCOMPANY>
   <FLDCRDCONTACT>{Web-Form-Contacts-First-&-Last-Name-Here}</FLDCRDCONTACT>
   <FLDCRDPHONE1>{Web-Form-Phone-Number-Here}</FLDCRDPHONE1>
   <FLDCRDEMAIL1>{Web-Form-Email-Address-Here}</FLDCRDEMAIL1>
  </RecordData>
 </RangerMSPTransaction>
 

Troubleshooting

Before troubleshooting the RangerMSP Email Connector, we suggest verifying that an email hass been sent from your web form. You can also first test your form by sending the XML emails to your private email account, review it and then forward it to the connector, once all is good, you can update the script to send directly to the RangerMSP Email Connector.

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

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

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

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

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


Troubleshooting XML

<?xml version="1.0" ?>
<?RangerMSPxml version = "1.0" ?>
<RangerMSPTransaction>
 <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> </RangerMSPTransaction>


See Also

RangerMSP Email Connector User Manual
RangerMSP Email Connector FAQ