Skip to Content

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.

/wp-content/uploads/2016/04/2016_04_12_10_44_31_928360.png

/wp-content/uploads/2016/04/2016_04_12_10_45_31_928362.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.

/wp-content/uploads/2016/04/2016_04_12_10_48_48_928364.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.

/wp-content/uploads/2016/04/2016_04_12_10_50_44_928365.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.  

/wp-content/uploads/2016/04/annie1_928366.png

Drill into Sources and there you can find the codes.

/wp-content/uploads/2016/04/annie2_928367.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.

<Property Name=”Sourcesap:filterable=”falsesap:updatable=”truesap:creatable=”falseFixedLength=”trueMaxLength=”3Nullable=”trueType=”Edm.String“/><Property Name=”SourceTextsap:filterable=”falsesap:updatable=”falsesap:creatable=”falseNullable=”trueType=”Edm.String“/>

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

/wp-content/uploads/2016/04/2016_04_12_10_58_19_928368.png

The result in C4C:

/wp-content/uploads/2016/04/2016_04_12_10_59_27_928369.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:

/wp-content/uploads/2016/04/2016_04_13_14_27_39_929446.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.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply