Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Activities tab from Sales in Service?

A prospect asked us yesterday if it was possible to see all activities for a company/contact when looking at that entity in Service, so basically having the activities tab in Sales on the company/contact card in Service.

Is it possible to achieve that without remaking the tabs entirely?

RE: Activities tab from Sales in Service?

Hi Patrik,

as far as I can think of - you've got two options:

1: Use listTableEntries:

Create a web panel on the company card in Service, add a Url of the type Ticket, and the rest should look like this:

&action=listTableEntries&ok=1&table=appointment&field.0=appointment.contact_id&value.0=

 

Pros:

- Quick and cost efficient

Cons:

- Does not look good, and you've got limited functionality

 

2: Create a script that displays a HTML table.

Here's a quick example of how it could look like:

%EJSCRIPT_START%
<style>
.table {
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 5px; 10px;
}
.table td {
  border-top: 1px solid #ccc;
}
</style>
<table class="table">
  <thead>
    <tr>
      <th>Owner</th>
      <th>Type</th>
      <th>Person</th>
      <th>Date</th>
    </tr>
  <thead>
  <tbody>
  <%
  String contactId = getCgiVariable("contactId");
  if(contactId.toInteger() > 0)
  {
    SearchEngine se;
    se.addField("appointment.appointment_id");
    se.addField("appointment.associate_id.name");
    se.addField("appointment.person_id.fullName");
    se.addField("appointment.task_idx.name");
    se.addField("appointment.do_by");
    se.addCriteria("appointment.document_id", "LtE", "0");
    se.addCriteria("appointment.contact_id", "Equals", contactId);
    for(se.select(); !se.eof(); se.next())
    {
      String ownerName = se.getField("appointment.associate_id.name");
      String personName = se.getField("appointment.person_id.fullName");
      String taskName = se.getField("appointment.task_idx.name");
      String doBy = DateTime(se.getField("appointment.do_by")).toString("DD2.MM2.YY4, HH24:MI2");
      
      printLine("<tr>");
      printLine("<td>" + ownerName + "</td>");
      printLine("<td>" + taskName + "</td>");
      printLine("<td>" + personName + "</td>");
      printLine("<td>" + doBy + "</td>");
      printLine("</tr>");
    }
  }
  %>
  </tbody>
</table>
%EJSCRIPT_END%

And add it as a web panel on the company card in Service.

 

Pros:

- You can make whatever functionality you want

- It can be as sexy as you want

Cons: 

- Requires Expander Services (should be on the pro list)

- Can cost a lot more than the customer is willing to pay

Af: Simen Mostuen Iversen 1. jul 2021

RE: Activities tab from Sales in Service?

Hi Patrik!

We have exactlly that need in our installation with our phone integration.

And this is how we solved it:
When a caller is identified the person card is displayed in Sales.
And there you see all tickets, all appointments and all documents for that person. And as a bonus you also see if he/she is a member in a project or part of a sale. Straight out of the box.

And to make it easy for the agent to navigate to this information we have a simple shortcut from person view in Service saing "Open in Sales"

And from person view in Sales a task item "Creat ticket"

If you show this to the prospect end also mention the pricetag you probably have a good answer if this is so important that they are prepared to pay a lot for a customization that is just one tab away..

 

Af: Göran Falkman 6. jul 2021

RE: Activities tab from Sales in Service?

Thanks Göran, that's a good approach to show a more cost efficient solution to the customer!

Af: Patrik Larsson 6. jul 2021