HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

How to link XML/ColdFusion page with live lookup?


#1

Hello, I’m currently working on live lookup connection with database. I created query with ColdFusion and XML output. After I past the link in Live Lookup settings I got an error. Here is the message:

An Error Occurred
XML Parser Returned Error: Invalid document end (5)
Source Path: http://test/apps/Milos/Livelookup.cfm
Call Type: http
View XML

I also can post my xml/coldfusion code if needed. Can anyone help me with this error? Thanks in advance.


#2

It looks like you have a local URL in there, will http://test actually resolve from the server?

You should make sure just via the browser that it’s correctly returning results as well by passing in variables that should return results via GET (or POST if you’ve set it up to use POST).


#3

I have set to return results via POST and XML Character Encoding is UTF-8. Still I did not get any customers after I run my Live lookup. Here is my code:

<cfquery name="myQuery" datasource="Testing">
	Select StaffId,FirstName,LastName
	From Staff
</cfquery>

<?xml version="1.0" encoding="utf-8"?>
	<livelookup version="1.0" columns="first_name,last_name">
		<staff>
			<cfoutput query="myQuery">
				<staff_id>#XMLFormat(StaffId)#</staff_id>
				<first_name>#XMLFormat(FirstName)#</first_name>
				<last_name>#XMLFormat(LastName)#</last_name>
				<email></email>
				<phone></phone>
			</cfoutput>
		</staff>
	</livelookup>

After I run this in the browser I’m getting output back with XML. If I pass the link of this page to HelpSpot Live Lookup Setting and run it I’m not getting any results. If you know what I’m doing wrong please let me know. Thanks in advance.


#4

At least one issue I see is you’re using the <staff> tag, but it should be <customers> you can see full details here https://support.helpspot.com/index.php?pg=kb.page&id=6

I realize they may be internal staff in your case, but the tag still needs to be customers.


#5

I have one more question for you, in the field where I post my http page, should that page be xml page or that page can be cfm page too?


#6

In the settings of HelpSpot you mean? You probably will be pointing to a .cfm file, but you’ll want to have the cfm file set an XML header.


#7

Thank you. That’s exactly what I need.