PDA

View Full Version : API by Email (XML Formatted Emails) HELP


pops1000uk
July 23rd, 2013, 02:06 PM
I have a wordpress site, using easy contact form plugin. How can I use XML to create a new account and ticket or find an existing user and create ticket>?

Support Team
July 23rd, 2013, 02:20 PM
We actually have no idea :-)

You should consult this with someone that knows WordPress well as well as any plugin that you use.

pops1000uk
July 23rd, 2013, 03:00 PM
i think i might of answered my own question....

What XML Script do I use to

Create a new account and open ticket for this account

I managed to send a confirmation XML Script to CommitCRM. I got it to create an account but not a ticket.

Support Team
July 24th, 2013, 06:16 AM
With implementing the API by Email, using XML, you need to call the API in order to insert the Account record, parse the response email with the newly created record ID and then pass it for new ticket creation.

Alternatively, if the customer is already register with yourself then you can ask for their email address in their form and then have the email, sent by the form, sent to the email connector public email address from this address (e.g. relay). The email connector will then convert it into a new ticket (This suggestion does not use the API but rather the Email-2-Ticket feature of the connector).

Hope this helps.

sudogreg
July 24th, 2013, 08:29 AM
pops1000uk we are also working on this - we use wordpress and CommitCRM with all the add-ons and interlink - have you had any luck getting this to work?

pops1000uk
July 25th, 2013, 07:41 AM
Yes I got it to work, but i have a little problem....

I have installed a plug in called Easy Contact Forms. Created a form to which i ask for, name, Company, email, phone number and whats up.

Easy contact forms has a option for notifications. This is where you place the XML in Text only format. You need to turn off Tiny MCE Editor and change the notifications to text only.

I place the following code;
<?xml version="1.0" ?>
<?commitcrmxml version = "1.0" ?>
<CommitCRMTransaction>
<ExternalApplicationName>WebsiteSignup</ExternalApplicationName>
<SendResponseToEmail>youremail@yourcompany.com</SendResponseToEmail>
<Password>API password from Commit</Password>
<ReturnTransactionID>data from external application (will be returned as-is in the response)
</ReturnTransactionID>
<DataKind>ACCOUNT</DataKind>
<RecordData>
<FLDCRDCOMPANY>Easy Contact forms fields for Company if applicable</FLDCRDCOMPANY>
<FLDCRDCONTACT>Easy Contact forms field Name</FLDCRDCONTACT>
<FLDCRDPHONE1>Easy Contact forms field Telephone number </FLDCRDPHONE1>
<FLDCRDEMAIL1>Easy Contact forms field Email</FLDCRDEMAIL1>
</RecordData>
</CommitCRMTransaction>

I pass this XML to my CommitCRM Email connector email address support@yourcompany.com

Great this creates an account within CommitCRM and I get the email to my inbox.

BUT::::

Even if the account exists a duplicate is created -- How can I stop this?
Can I create a ticket from this submission also passing some other XML???

Any help?

Support Team
July 25th, 2013, 10:05 AM
Once the Account is created in RangerMSP the email connector sends you another email. You have to parse it first, get the internal RECID of the newly created account and then pass it as part of the XML transaction you send to open the Ticket. There is no way to combine the two.

pops1000uk
July 25th, 2013, 10:09 AM
HOW :)

Support Team
July 25th, 2013, 10:51 AM
You will need to write a more advanced PHP program.
Another trick that you can do is this -
After the Account is created with the XML transaction, send the email with the ticket description to the email connector address as a STANDARD email (not XML) where you set the Sender to the email address of the user that filled the Web form. The email connector will now be able to find the email address and therefore create a new ticket under this account. This, however, won't work with duplicates.

pops1000uk
July 25th, 2013, 02:14 PM
how do i stop duplicate accounts from what i explained above?

lpopejoy
July 25th, 2013, 08:27 PM
You can't - unless you use php to query (via Odbc or API) to see if an account already exists.

pops1000uk
July 26th, 2013, 03:20 AM
Has anyone got a php script going spare? :-)