PLEASE UPDATE YOUR BROWSER

1 Reason Insurance (715)598-9924

Leadership Through Service

  • About
    • Meet the Insurance Agents of 1 Reason Insurance
    • Partner Insurance Companies
  • Personal Insurance
    • Car Insurance Quote for Personal Auto
    • Boat Insurance
    • Home Owners Insurance Application
    • Life Insurance Quotes
    • Motorcycle Insurance
    • Personal Umbrella Insurance
    • Renters Insurance
    • RV Camper Insurance
    • Snowmobile Insurance
  • Business Insurance
    • Commercial Auto Insurance
    • What is General Liability Insurance
    • Rental or Vacant Properties
    • Workers Compensation in Wisconsin
  • Blog
  • Contact 1 Reason Insurance
    • Contribute As Guest Author
Home > SuiteCRM Insurance CRM > Importing Clients Into SuiteCRM Using XML

Importing Clients Into SuiteCRM Using XML

Posted on: February 7, 2018 By: robert

I want to create a road map on how to automatically import lead and client data into SuiteCRM and this will be the working article I use to record my progress, and reference later.

Currently, the plan is to create a sub domain that all lead data will first go to for scrubing and massaging, and from there it will go on to the SuiteCRM system for import.

In the sub domain, the mapping of fields will occur, along with changing caps of any given data point, and phone numbers formated correctly etc….

Because PHP has a built-in parser called SimpleXML Parser (fair enough name for an XML parser I believe), I will attempt to use that and see how it goes.

In order to read an XML string of data, the PHP simpleXML_load_string() function is used.

Using sample test data, we can see this in action:

$ClientXMLData = 
"<?xml version='1.0' encoding='UTF-8'?>
<ContactInfo>
<FirstName>Lori</FirstName>
<LastName>Robert</LastName>
<heading>New Client</heading>
<CompanyName>ABC Company</CompanyName>
</ContactInfo>";

The above XML is read using the following code:

$xml=simplexml_load_string($ClientXMLData) or die("Error: Cannot create object");
print_r($xml);

The print_r should give us something that looks like:

SimpleXMLElement Object ( [FirstName] => Lori[LastName] => Robert[heading] => New Client [CompanyName] => ABC Company )

The XML documents I want to import includes the following fields

<InsuranceRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<ZipCode>78759</ZipCode>

<ContactInfo>

<FirstName>Isaac</FirstName>

<LastName>Allen</LastName>

<Address>79108 Mopac Hwy</Address>

<ZipCode>78759</ZipCode>

<City>AUSTIN</City>

<County>TRAVIS</County>

<State>TX</State>

<PhoneDay>8047528122</PhoneDay>

<PhoneEve>8048598397</PhoneEve>

<PhoneCell>8047528122</PhoneCell>

<Email>IsaacAllen262329296@test.org</Email>

<Comment>None</Comment>

</ContactInfo>

<BusinessPropertyInsurance>

<CompanyName>Test Company</CompanyName>

<LegalEntity>Sole Proprietorship</LegalEntity>

<YearsInBusiness>40</YearsInBusiness>

<Revenue>Under $100,000</Revenue>

<Partners>29</Partners>

<FullTimeEmployees>6</FullTimeEmployees>

<PartTimeEmployees>14</PartTimeEmployees>

<SubContractors>9</SubContractors>

<SIC>0111</SIC>

<SeasonalBusiness>false</SeasonalBusiness>

<Subsidiaries>3</Subsidiaries>

<RequestedCoverage>

<General_Liability>false</General_Liability>

<Commercial_Auto>false</Commercial_Auto>

<Commercial_Property>false</Commercial_Property>

<Professional_Liability>false</Professional_Liability>

<Directors_and_Officers_Liability>false</Directors_and_Officers_Liability>

<Business_Owners_Package_Policy>true</Business_Owners_Package_Policy>

<Workers_Compensation>false</Workers_Compensation>

<Commercial_Crime>false</Commercial_Crime>

</RequestedCoverage>

</BusinessPropertyInsurance>

</InsuranceRequest>

Comments

comments

Categories: SuiteCRM Insurance CRM, Tips & Advice Tags: XML Import

1Reason Agencies

What clients have to say:

Mike T. "I started a business last year and Robert responded to my inquiries immediately, and was extremely helpful and knowledgeable as to the type of insurance coverages I would need to get started. Now its been a year and he now carries All of my coverages! Absolutely the most hands on agent I've ever worked with but hands down the friendliest! I can call him anytime and never feel rushed and not only that but he responded while on a family vacation. I believe in relationships in business and so does Robert by the way he treats his customers. I have a true friend in the business, thank you Robert!"


Lynn R. "Bob is very knowledgeable and has always done a great job explaining different aspects of coverage. He is very accessible and looks out for what is best for the consumer. We highly recommend him!


Justin T. "Excellent agent, always available for answers to insurance related questions. Bob, is the person most people strive to become. Without a doubt, a great person!"


Sebastian T. "I can not begin to tell you how pleased I am with 1 Reason Insurance ! Their responding services is friendly and complete. For the services my company offers to the public it is sure nice to know that we are covered for a reasonable fee. Just having (1 R I ) 1 Reason Insurance there is such piece of mind ! Their insurance plans are strait to the point and easy to understand.
Thanks for the great service 1 Reason Insurance !"


Jeff H. "Very nice and cares about the customer! He was literally the reason why i chose him over other companies for my insurance"

Categories

  • Bonds
    • Performance Bond
  • Bookkeeping
    • Business Taxes
  • Business Marketing
    • Webhosting
  • Car Insurance
  • Commercial Auto
  • Commercial Insurance
  • Court Cases
  • Cyber Liability Insurance
  • Employment Opportunities
  • Employment Practices
  • Flood Insurance
  • Home Ownership
  • Homeowner's Insurance
  • Insurance Companies
    • Insurance News
  • Insurance Terms
  • Investing
    • Finance & Insurance News
  • Life Insurance
  • Non Emergency Medical Transportation
  • Payroll
  • Pinewood Derby
  • Professional Liability / E&O
  • Real Estate News
  • Rental Property Insurance
  • Retirement & Estate Planning
  • RV Insurance
  • Starting A Business
  • Stock Dividends
  • SuiteCRM Insurance CRM
  • Taxes
  • Tips & Advice
  • Travel
  • Uncategorized
  • Worker's Compensation

Recent Posts

  • Armada Hoffler to Report Second Quarter Earnings on August 4th
  • ARMOUR Residential REIT, Inc. Announces Guidance for July 2025 Dividend Rate per Common Share
  • Highwoods to Release Second Quarter 2025 Results Tuesday, July 29th
  • Concord Crest Real Estate Announces the Launch of Its Operations in Miami
  • Dalfen Industrial Expands Las Vegas Footprint with Acquisition of Diablo Drive Properties
  • DeFi Dev Corp. and dogwifhat Unleash Validator Partnership to Help Power Solana’s Future
  • Sunrise Realty Trust Schedules Earnings Release and Conference Call for the Second Quarter Ending June 30, 2025
  • Macerich Acquires Market-Dominant Crabtree Mall in Raleigh, NC for $290 million