Quantcast
Channel: SCN : Blog List - SAP Cloud for Customer
Viewing all articles
Browse latest Browse all 325

Managing Custom Filters for Opportunity and Service Ticket Widgets in SAP Jam

$
0
0

When integrating SAP Cloud for Customer with SAP Jam there are standard filters used when viewing objects such as Opportunities and Service Tickets.     For Opportunities, standard examples include:  Latest Opportunities, High Value Opportunities, Closing within 30 Days, and High Chance of Success.


custom filter 1.png



This blog describes the common queries and how you can add your own filters.   

To view or edit the filters go to the SAP Jam Admin Console.

1.  Select Adminà Integrationsà External Applicationsà Find the name of your C4C environment and select the ‘Action’ dropdown à Choose ‘Manage Record Types’ ->


custom filter 2.png

2.  Find the desired business object (i.e. Opportunity) and choose ‘Filters’ on the right hand side ->From here you can add a new filter or edit existing filters.

2016-04-12_10-44-31.png

2016-04-12_10-45-31.png

Before adding a new filter, you need to know the fields from the OData API.   For example, you want to add a filter for Opportunities generated from a Campaign. In the example below, the opportunity is ‘Q1 Red’ and the source is ‘campaign’. 

Next, look at the OData service.  You can view this in the “Manage Record Types” configuration in SAP Jam. Navigate to Admin Integrations → External Applications.  Find the application for C4C and select Action → Manage Record Types. Then select Edit on the Opportunity record type.

Then copy the URL address in the ‘External Type’ section outlined below (https://<tenant>/sap/byd/odata/v1/c4c.svc/$metadata#OpportunityCollection) and paste it into you’re a new browser tab to view the annotation.

2016-04-12_10-48-48.png

Next, look at the OData service.  You can view this in the “Manage Record Types” configuration in SAP Jam. Navigate to Admin Integrations → External Applications.  Find the application for C4C and select Action → Manage Record Types. Then select Edit on the Opportunity record type.

Then copy the URL address in the ‘External Type’ section outlined below (https://<tenant>/sap/byd/odata/v1/c4c.svc/$metadata#OpportunityCollection) and paste it into you’re a new browser tab to view the annotation.

 

2016-04-12_10-50-44.png

When looking at the OData service, search for the field you want to filter on.  When searching for Source, you notice Source and SourceText.  If you use the ‘Source’ field you will need to know the codes for each source type.  Code values normally come from the Business Configuration – Fine Tuning in C4C. You can find the code values by navigating to Business Configuration → Implementation Projects →  Open Activity List.  Then search for Opportunities in the Fine-Tuning phase.  

annie1.png

Drill into Sources and there you can find the codes.

annie2.png

In this example, we will use the “SourceText” field to type out the name of the source vs using the code value.  When typing out the name, be sure to get the upper and lower case exactly correct.

<PropertyName="Source" sap:filterable="false" sap:updatable="true" sap:creatable="false" FixedLength="true" MaxLength="3" Nullable="true" Type="Edm.String"/><PropertyName="SourceText" sap:filterable="false" sap:updatable="false" sap:creatable="false" Nullable="true" Type="Edm.String"/>

In this case, the filter value is: SourceText eq ‘Campaign’. 

2016-04-12_10-58-19.png

The result in C4C:

2016-04-12_10-59-27.png

Additional Tips:

The following are comparison operators:

  • eq – Equal to
  • ne – Not equal to
  • lt – Less than
  • le – Less than or equal to
  • gt – Greater than
  • ge – Greater than or equal to

 

The following are additional filters there are often requested. The syntax below can be copied into your filter.

To edit the filters in the Admin Console.  Adminà Integrationsà External Applicationsà Find the name of your C4C environment and select the ‘Action’ dropdown à Choose ‘Manage Record Types’ -> Find the desired business object (i.e. Opportunity) and choose ‘Filters’ on the right hand side ->From here you can add a new filter or edit existing filters. The syntax below can be copied into this area.

1.       Name
               Opportunities won due to Product differentiation

          Filter

    ReasonForStatus eq '005'

Enabled
true

The full list of reason codes for the win (or loss) can be substituted for the ‘005’ in the filter above:  These can be found using Fine Tuning.as described above.

2.       Name

                  Opportunities we Won

 

              Filter

                   Status eq '4'

 

               Various Status codes can be tracked (i.e. replace ‘4’ with ‘5’ to track Lost opportunities). Refer to Fine Tuning for a list of codes.

.

3       Name
             Lost Opportunities


         Filter

Status eq '5'

Enabled

true

 

4..       Name
              Opportunities in Sales Phase ‘Decision’

           Filter

   SalesPhaseText eq 'Decision'

You can replace the Sales Phase Decision with any of these other phases:

 

2016-04-13_14-27-39.png

So get started creating your own custom filters and add them to your overview pages! Give us some feedback on how your doing with the customization.


Viewing all articles
Browse latest Browse all 325

Trending Articles