Skip to Content
Product Information
Author's profile photo Mohamed Gaber

How to Convert C4C visits Longitude & Latitude to a maps link to know employees’ Actual locations Check in/out

Hello Everybody,



This blog focuses on Visits object that exist in C4C Sales/Service. In many businesses and industries Visits are a main object that sales managers depend on for tracking their employees’ visits to clients, which can enhance managers’ evaluation to their employees and check what his employees have done in their visits.


As soon as Employee enter the customer’s site, he can use his cell phone to check in into the visit. To do this, open the visit and click on the Check-In Button. The fields Check‑In LatitudeCheck-In Longitude and Check-In Date/Time will be filled automatically. At the same time, the Status can be automatically set to In Process with the check-in function.


After the last word has been exchanged during the visit, employee have said goodbye and left the client’s site, he can check out from his cell phone. The fields Check‑Out LatitudeCheck-Out Longitude and Check-Out Date/Time will be filled automatically. At the same time, the Status will be automatically set to Completed.

The following figures show the principle of check-in and check-out via cell phone.



Requirements outside of the box 

You can See that Check‑In LatitudeCheck-In Longitude and Check‑out Latitude, Check-out Longitude are appearing as a text not a link, so Sales manager can check the actual location that the employee has checked in-out. Which drags us to think how can we convert Check‑In LatitudeCheck-In Longitude and Check‑out Latitude, Check-out Longitude into two URLs that directs us to google maps


Configuration Steps 

Let us do it for Check‑out Latitude, Check-out Longitude. 

First of all,

you have to make two custom Calculated fields with type (Decimal).

  1. Create one field calculates the Check‑out Latitude and the other calculates the Check-out Longitude, With these specifications according to the Lat. and Long. Decimal places and lengths 
  2. Create the check out latitude field as below. Choose in the calculation operand: (Measure (EndGeoCoordinates/LatitudeMeasure)

2. And then Create the anther field that calculates the Checkout Longitude with the same way but here choose in the calculation operand: Measure (EndGeoCoordinates/LongitudeMeasure)

3. Now, you have two Custom Decimal field calculates the Checkout longitude and latitude individually, Which are copied or copied from the two standard fields Once the employee clicks on Check out


4. We want now to merge these fields in one concatenated field, So what shall we do ?

yes, correct. We will make a workflow now which we can concatenate these two fields

5. But first we want to create another custom field to put the concatenated values of the two custom fields (Sales REP Checkout Actual location Link)

6. Create a Workflow for visits business object with NO condition


7. In the Action page, Choose (Field Update) and choose the field that you want be concatenated by the two Z fields created “Sales REP Checkout Actual location Link”

8. Choose in the update Type (Formula). then Create the formula as in the figure below. And make Sure from the Syntax by check the button at the lower right. 

Also make sure that concatenate also the Comma (,) between Long and Lat since the non-existence of tis comma causes wrong mapping between the coordinates and doesn’t direct you to any location


9. Activate your Workflow

10. Make Sure that the workflow works and concatenates the two Z fields of the coordinates with the correct way of google maps or any other maps

Here you can see that the field got concatenated successfully with a comma between them


Google Maps URL mashup

A Mashup is used for different desires for example you can use a mashup to call an external link from an external system or an ERP T-Code from S4/HANA so you can use an HTML Mashup or you can use it for directing you to an external page or any embedded component

So, here we can use a URL mashup for converting the concatenated field “Sales rep checkout actual location” to a Link


Configuration Steps 


  1. From Administrator workcenter, Go to Mashup authoring facet

2. Then choose “New” and then choose “URL MASHUP”

  1. Choose Without Port binding
  2. Choose your mashup category
  3. Name your mashup as this name, the mashup will be appeared with in the visit

Then Enter URL information 


  1. Enter the Google Maps URL
  2. Enter (q) as a parameter for the mashup
  3. Then Activate the mashup and save

GO to the Visit view and Start adaptation mode

  1. Click on Add Mashup


2. Click on your mashup from list of mashups,


3. Then Map the field you want the mashup to be triggered from

Then Save and add the mashup Link


4. you can find now the mashup link ready for use appears beside the concatenated field


5. lets try now to click on the mashup link for checking the employee’s actual check out location on the maps

You can find that the Actual checkout location of the employee on google maps


Note:  You can do this for check in location also, not only for locations. But you can implement this for any business object you want depending on your customer Needs and business


Wait for the next blog to know how to map this Feature with the (Outside Range) feature in C4C. which inform sales manager is the employee is outside of the range or inside 


I hope that this blog was useful for you and good luck for all of you 😀

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Can Akalin
      Can Akalin

      Really liked this topic. Remind me of something similiar that I did. We basically keep customer's latitude and longitute data on the account's address data. And I designed a custom map based on Google Map API in order to do Account Management on the map for mobile Sales reps. Basically they manage everything related to their customers on the map with relevant pop-ups, buttons, actions and controls. And embeded it as a mashup in a custom workcenter view. But after all that complexity, I liked the simplicity in this configuration.👍