XML Sync

By using XML sync, customer data stored in another system will be available and up-to-date in MiniCRM as well.

API vs. XML Sync

  • MiniCRM API: It makes real-time data access possible. You can make queries, send data requests, or update customer data in MiniCRM. Use API if the identification logic is unique, the data you want to import depends on data stored in MiniCRM, or the number of opportunity cards you want to move is relatively low.

  • XML Sync: One-way data sync to MiniCRM from another system. This way, basic, CRM-related customer information can be synced daily to MiniCRM. Use XML sync if huge quantity of data has to be added to MiniCRM. Data is not added in real-time, the ideal update period is couple of hours / 1 day.

The other system prepares a file in XML format. MiniCRM downloads and processes it in reaction to an API call. MiniCRM updates the already existing data and creates new ones if it is necessary. There is no need to resend all opportunity cards/fields by every sync. MiniCRM can accept XML files that contain only modified data.

XML sync is suitable to update even millions of opportunity cards.

Submitting XML

For example, if the current update for MiniCRM is available on the URL below:
https://backend.sample.hu/minicrm-2015-06-08.xml

You can start the sync (endpoint of MiniCRM API SyncFeed, Url of the XML in Source parameter) by calling the URL below:

https://r3.minicrm.hu/Api/SyncFeed/12345?Source=https%3A%2F%2Fbackend.sample.hu%2Fminicrm-2015-06-08.xml

Replace 12345 with the Id of the system that you want to update. The source url could be password protected. Using encrypted connection (HTTPS or FTPS) is recommended. In order to ensure maximum security, it is worth to restrict accessing files to MiniCRM Syncfeed IP addresses:

  • 195.228.75.210

  • 195.228.75.211

  • 195.228.75.201

  • 195.228.75.202

  • 195.228.75.203

  • 195.228.75.204

Example XML

See the example below. It is not required to fill out most of the basic fields. Unique field names added to the system are available via API, and while you are editing fields on the Edit fields page, the normalized field names that are used via API are displayed.

<Projects>
	<Project Id="123456">
	    <Name>Name of example opportunity card</Name>
	    <StatusId>In progress</StatusId>
	    <UserId>Colleague’s name</UserId>
	    <CategoryId>3</CategoryId>
	    <Business>
	        <Name>Company name</Name>
	        <Url>http://minicrm-test.local/</Url>
	        <Description>Description</Description>
	        <Region>North West</Region>
	        <Employees>268</Employees>
	        <YearlyRevenue>12</YearlyRevenue>
	        <EUVatNumber>GB12345678</EUVatNumber>
	        <RegistrationNumber>6666-66-666666</RegistrationNumber>
	        <BankAccount>34255345-44325543-15485245</BankAccount>
	        <Swift>34-45432345-342345345-2</Swift>
	        <Emails>
	            <Email><Value>companyname@mc.local</Value><Type>home</Type><Default>0</Default></Email>
	            <Email><Value>Officecompanyname@mc.local</Value><Type>office</Type><Default>1</Default></Email>
	        </Emails>
	        <Phones>
	            <Phone><Value>+441614960654</Value><Type>office</Type><Default>1</Default></Phone>
	            <Phone><Value>+44 161 496 0057</Value><Type>home</Type><Default>0</Default></Phone>
	        </Phones>
	        <Addresses>
	            <Address><PostalCode>0161</PostalCode><City>Budapest</City><Address>50 Thomas Street</Address><Type>HQ</Type></Address>
	            <Address><PostalCode>0161</PostalCode><City>Gy&#337;r</City><Address>70 Phillips Street</Address><Type>Shop</Type></Address>
	        </Addresses>
	    </Business>
	    <Contacts>
	        <Contact>
	            <FirstName>First name</FirstName>
	            <LastName>Last name</LastName>
	            <Position>CEO;</Position>
	            <Emails>
		            <Email><Value>contact@mc.local</Value></Email>
	            </Emails>
	            <Phones>
		            <Phone><Value>+441614960654</Value></Phone>
		            <Phone><Value>+44 161 496 0057</Value></Phone>
	            </Phones>
	        </Contact>
	        <Contact>
	            <FirstName>First name2</FirstName>
	            <LastName>Last name2</LastName>
	            <Position>Assistant</Position>
	            <Emails>
	            	<Email><Value>OfficecontactB@mc.local,contactB@mc.local</Value></Email>
	            </Emails>
	            <Phones>
	            	<Phone><Value>+44 161 496 0003 +44 161 496 0480</Value></Phone>
	            </Phones>
	        </Contact>
	    </Contact>
	</Project>
	<Project Id="123457">
		...
	</Project>
</Projects>

Using Reference Id

MiniCRM API is able to receive Reference Id for projects.

Endpoint: https://SystemId:ApiKey@r3.minicrm.hu/Api/SyncFeed/SystemId/SetReferenceId

You have to create a JSON array, the key must be ProjectId and the value must be ReferenceId. That array has to be sent in the References variable with POST method by authenticating with API key.

Example: $ curl https://SystemId:ApiKey@r3.minicrm.hu/Api/SyncFeed/SystemId/SetReferenceId –data ‘References={“12”:123456788,”13”:123456789}’

The command above sets the received ReferenceId for the 12 & 13 MiniCRM Id projects.

In Json arrays, the key has to be a string (value could be a number). Php json_encode returns an output that is accepted by API.