Update Contact Phone from Landing Page for Case

Hi Community,

We implemented a Landing page to create Case (Web-to-Case) in which we have Email, Name and Phone Number of the Contact.

When the Contact doesn´t exist in the environment it is properly being created (which is right). However, if the Contact already exist, the newly created Case is assigned to the existed contact (which is right) but the phone number is not getting updated even if it is originally null.

Any thoughts?

Thanks.

Like 0

Like

8 comments

Hi Danilo,

You can create your custom Process started when Contact is assigned to Case. In this process you can compare received Communication options with existing ones and add them if necessary

Vladimir Sokolov,

Hi Vladimir, thanks for you message.

I am not clear on what you are refering to. What is the Phone field that comes from the Landing Page?

Thanks,

Danilo Lage,

The logic for creating cases from landing pages is covering setting of mobile phone when initially creating a contact for case. The logic is as follows:

  1. If contact fields matches the [Name], [Email] and [Phone] fields from the filled form, they will be added to the created case.
  2. If contact fields matches only the [Name] and [Email] fields from the filled form, they will be added to the created case.
  3. If contact fields matches only the [Email] field from the filled form, it will be added to the created case.
  4. Otherwise, a new contact is created and the [Name], [Email] and [Phone] fields will be filled in. The created contact is added to the registered case.

In case you indicate the existing contact, the mobile phone value will be ignored and won't update the existing contact with the values from landing.

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, thanks for your message. 

Concerning to the following sentence: "In case you indicate the existing contact, the mobile phone value will be ignored and won't update the existing contact with the values from landing."

We are looking for a way to change this behavior and actually update the existing contact (on steps #2 and #3 of the logic you described). Is this something we can do?

If not, is there a way to remove the Phone from the Web-To-Case landing page without causing this to break the form submition?

Thanks.

Danilo Lage,

There are two ways of achieving your task. The first one requires much of advanced development. You can override the 

WebFormCasePreProcessHandler source code so it will be processing the web-to-case logic in the way you need it. 

The second one is to create a field, e.g, mobile phone in the Case object. In the config on the landing page you map the mobile phone input to both mobile phone in Contact object and Case. Create a business process, which would be triggered when contact is linked to the new case. Check whether contact has a mobile phone, and set the phone if it exists in the custom phone column of Case object. 

Therefore, when case with existing contact and firstly indicated phone will come from landing, the existing contact will be linked to the case, just inserted phone will be added to case phone column and business process will set it to the contact. 

This is probably not the most elegant way, but the one I can think of.

Hope you will find it helpful,

Anastasia

Anastasia Botezat,

Hi Anastasia, good morning.

Is the WebFormCasePreProcessHandler source code on the server side? My client´s using cloud.

Thanks.

Danilo Lage,

Yes, this is source code, but we highly do not recommend interfering with basic logic, since it may cause unexpected errors.

Please rather consider making mobile phone a required field on your landing, so to fill it in when contact is initially created.

Regards,

Anastasia 

Anastasia Botezat,

Thanks, Anastasia. I will send your recommendation to client. Let´s see.

Show all comments