Overview

The Activity service allows you to fetch business entities such as campaigns, surveys, or service orders, and the relevant Metrics from an Source system. The activity source system can be an SAP Hybris Marketing system, SAP S/4HANA Marketing Cloud system, or any third-party system. You can configure the activity source system using the Customer Journey Manager Configuration service.

Use a standard REST call to view activities.


API Reference

/entities

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

/entities

get

Retrieves a list of entities like activity campaigns.

Accepted scopes:

  • hybris.activity_view – Required to retrieve entities

/entities/{entityId}

get

Retrieves an entity.

Accepted scopes:

  • hybris.ymkt_view – Required to retrieve a entity

/entities/{entityId}/metrics

This resourceType defines the GET, POST, DELETE methods and their responses for a collection resource.

get

Retrieves a list of activity metrics.

Accepted scopes:

  • hybris.activity_view – Required to retrieve activity metrics

/metrics

DEPRECATED

/metrics

get

Retrieves a list of activity metrics.

Accepted scopes:

  • hybris.activity_view – Required to retrieve activity metrics


Scopes in Activity Service

Scopes prevent unauthorized access to the Activity service.

You must provide a proper scope that allows users to perform certain operations. Grant the scopes in an access token from the OAuth2 service. For more information about the authorization and authentication used in SAP Hybris services, and also about the scopes in general, see: Authorization Scopes

The Activity service supports the scope:

ScopeDescription
hybris.activity_viewUse this scope to view activity.


Get Entities

This tutorial illustrates how to fetch a business entity, such as a campaign, from an Source system.

The following example describes how to fetch a Facebook campaign from a source system.

Before you fetch the Facebook campaign, configure the activity source system. For more information, see the Configuration service. With Customer Journey Manager, you can use the pre-delivered activity template for Facebook, templateID=1, to fetch a Facebook campaign. For more information, see the Template service.

Request

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/cjm-activity/v1/entities?templateId=1

Response

  • Status Code: 200
  • Example:
    {  
     "additionalDetails":{  
        "createdOn":"1479298084000+0000",
        "timestamp":"1479298083545+0000",
        "createdBy":"Test User"
     },
     "id":"0000075453",
     "name":"Facebook Campaign"
    }
    

     


Get Metrics

This tutorial illustrates how to fetch Metrics from an Source system.

The following example describes how to fetch the activity metrics of a Facebook campaign with ID=0000075453.

Request

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/cjm-activity/v1/metrics?templateId=1&entityId=0000075453

Response

  • Status Code: 200
  • Example:
    {  
     "data":{  
        "UniqueImpressions":"2108",
        "Clicks":"4115"
     }
    }
    

     


Glossary

TermDescription
MetricsMeasurable data associated with an activity.


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.