Home > Forum > Prevent LiveAgent API from updating an existing customer based on phone number

Prevent LiveAgent API from updating an existing customer based on phone number

Apr 06 (6 months ago)
Morgan Nunan wrote
Hi, I'm using the API to send and retrieve data using cURL, and the examples provided in the documentation. My code works fine, except the following scenario seems to be playing out:

My site: "Is the record [email address] in your system, LiveAgent?"

LiveAgent says, "We don't have anyone with the identifier [email address] in our system".

My site: "OK, then add this record". My site hands the data through the API to LiveAgent, and walks away.

Live Agent starts to add the record and then says "Wait, we do actually have this *phone number* on file, I'll just update that record."

This is a problem because you might have multiple employees sharing an office line, or a family sharing a home phone, but who have different email addresses. If Mr. Husband submits a request with his name, email and phone number, and then Mrs. Wife submits a different request, with the same house phone, but with a different email and name, The API just updates the existing record, rather than creating a new one.

What's more, it preserves the email address as the unique identifier, and only updates the name. So I get a record with His name, her email, and I'm not sure who contacted me!

To solve this, I probably need the API to create a new record, even if the phone number is already on file.
Reply
3 Answers
Apr 07 (6 months ago)
Anonymous agent wrote
Thank you for your message. Most probably you are not using correct API or your trigger is incomplete.

Please, send us your complete API code to our email support address and our developers will take a look what might be a problem there.

support@qualityunit.com
Apr 07 (6 months ago)
Morgan Nunan wrote
Thanks for the reply. I have send a code snippet to the email you listed in your post.

However, I also logged into the agent area of LiveAdmin, manually added a customer, and then manually added a second customer with the same phone number.

The result was the same: the system automatically updated the old contact with the new name.
Apr 08 (6 months ago)
Anonymous agent wrote
Thank you for the ticket submission, your ticket will be reviewed and answered by our developers directly now.

Ready to try LiveAgent?

It's free for the first 14 days! No credit card required.

Get Started
We work well with others...
Magento Joomla Wordpress Mailchimp
Contact us

support@ladesk.com

+1-800-811-6590 (Toll Free in USA & Canada)

+421 2 33 456 826 (European Union & Worldwide)

Quality Unit, LLC 616 Corporate Way, Suite 2-3278 Valley Cottage, NY 10989

Stay in touch
Blog Google+
© 2004-2015 QualityUnit.com, All rights reserved