Customer Journey Manager Configuration

Overview

The Customer Journey Manager Configuration service is a mashup service that you can use to configure the Customer Journey Manager application.

Use this service to perform these configuration tasks:

  • Upload a logo for the Customer Journey Manager application. This logo appears beside the product name in the application.
  • Integrate the application with SAP Jam to collaborate with users, and share information.
  • Configure the Source system from which the service fetches activities. The source system can be an SAP or non-SAP system.
  • Create your custom Activity Template.
  • Create your own Stage Template.
  • Import or export a stage or activity template.
  • Provide the URL to access the Customer Journey Manager application.

Use a standard REST call to perform all operations related to creating, deleting, viewing, and updating configurations.


API Reference

/activityTemplates

/activityTemplates

get

Retrieves a list of activity templates.

Accepted scopes:

  • hybris.config_view – Required to retrieve activity templates
post

Creates a activity template.

Accepted scopes:

  • hybris.config_manage – Required to create an activity template

/activityTemplates/{templateId}

get

Retrieves an activity template.

Accepted scopes:

  • hybris.config_view – Required to retrieve an activity template
put

Updates an activity template.

Accepted scopes:

  • hybris.config_manage – Required to update an activity template
delete

Deletes an existing activity template.

Accepted scopes:

  • hybris.config_delete – Required to delete an activity template

/stageTemplates

/stageTemplates

get

Retrieves a list of stage templates.

Accepted scopes:

  • hybris.config_view – Required to retrieve stage templates
post

Creates a stage template.

Accepted scopes:

  • hybris.config_manage – Required to create a stage template

/stageTemplates/{templateId}

get

Retrieves a stage template.

Accepted scopes:

  • hybris.config_view – Required to retrieve a stage template
put

Updates a stage template.

Accepted scopes:

  • hybris.config_manage – Required to update a stage template
delete

Deletes an existing stage template.

Accepted scopes:

  • hybris.config_delete – Required to delete a stage template

/sourceSystems

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

/sourceSystems

get

Retrieves a list of source systems.

Accepted scopes:

  • hybris.config_view – Required to retrieve source systems
post

Creates a source system.

Accepted scopes:

  • hybris.config_manage hybris.config_admin – Required to create a source system

/sourceSystems/{sourceSystemId}

This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.

get

Retrieves a source system.

Accepted scopes:

  • hybris.config_view – Required to retrieve the source system
put

Updates a source system.

Accepted scopes:

  • hybris.config_manage hybris.config_admin – Required to update a source system
delete

Deletes a source system.

Accepted scopes:

  • hybris.config_delete hybris.config_admin – Required to delete a source system

/logos

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

/logos

get

Retrieves a list of application logo.

Accepted scopes:

  • hybris.config_view – Required to retrieve application logo
post

Creates an application logo.

Accepted scopes:

  • hybris.config_manage – Required to create an application logo

/logos/{logoId}

This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.

get

Retrieves an application logo.

Accepted scopes:

  • hybris.config_view – Required to retrieve an application logo
put

Updates an application logo.

Accepted scopes:

  • hybris.config_manage – Required to update an application logo
delete

Deletes an application logo.

Accepted scopes:

  • hybris.config_delete – Required to delete an application logo

/media

/media

get

Retrieves media.

Accepted scopes:

  • hybris.config_view – Required to retrieve media content
post

Upload a media.

Accepted scopes:

  • hybris.config_manage – Required to upload media content

/media/{mediaId}

get

Retrieves media.

Accepted scopes:

  • hybris.config_view – Required to retrieve media content
delete

Deletes media.

Accepted scopes:

  • hybris.config_delete – Required to delete media content

/collaborations

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

/collaborations

get

Retrieves a collaboration.

Accepted scopes:

  • hybris.config_view – Required to retrieve collaboration
post

Creates a collaboration.

Accepted scopes:

  • hybris.config_manage hybris.config_admin – Required to create a collaboration

/applications

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

/applications

get

Retrieves application name and URL.

Accepted scopes:

  • hybris.config_view – Required to retrieve application details

/import

/import

post

Import templates.

Accepted scopes:

  • hybris.config_manage hybris.config_admin – Required to import templates

/export

/export

get

Export templates.

Accepted scopes:

  • hybris.config_view - Required to export templates

/initialLoad

/initialLoad

post

Creates default content on subscription to Customer Journey Manager package.

Accepted scopes:

  • hybris.config_manage – Required to create default content

/tiles

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

/tiles

get

Gets the List of Tiles

Details:

  • Get The list of tiles
post

Creates Tile

Details:

  • Creates Tile

/tiles/{tileId}

This resource type defines the GET, PUT, DELETE methods and their responses for a single element resource.

get

Gets a specific Tile by tileId

put

Updates a specific Tile by tileId

delete

Delete a specific title by id

/tiles/{tileId}/feeds

get

Retrieves feed results for given tile.

Accepted scopes:

  • hybris.config_view – Required to get feed results for given tile

/feeds

/feeds

post

Retrieves feed results.

Accepted scopes:

  • hybris.config_view – Required to get feed results


Scopes in Customer Journey Manager Configuration Service

Scopes prevent unauthorized access to the Customer Journey Manager Configuration 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 YaaS services, and also about the scopes in general, see: Authorization Scopes

These scopes are supported by the Customer Journey Manager Configuration service:

ScopeDescription
hybris.config_viewUse this scope to view configurations.
hybris.config_manageUse this scope to create and modify existing configurations.
hybris.config_deleteUse this scope to delete existing configurations.
hybris.config_adminUse this scope to give administrator rights to a user.


Perform Simple CRUD Operations on the Configuration Service

Manage your Customer Journey Manager configuration using the Configuration service. To perform the basic create, retrieve, update, and delete (CRUD) operations that the Configuration service supports, you must have proper authorization, which requires that the header carries the correct access token. The examples in this tutorial lead you through those operations, showing what you need to provide to the methods, and the responses you receive in return.

clientId = clientIdPlaceholder;
clientSecret = clientSecretPlaceholder;
tenant = projectIdPlaceholder;
client = appIdPlaceholder;
scopesRequired = 'hybris.tenant='+tenant+' hybris.configuration_view hybris.configuration_manage hybris.configuration_delete';
access_token = tokenPlaceholder;

Get an access token

To perform any operation, you need an access token. To obtain an access token, create an API Client for the OAuth2 service:

API.createClient('oAuth2Service',
'/services/oauth2/v1/api.raml');

Now, get the token:

AccessToken = oAuth2Service.token.post({
  'client_id' : clientId,
  'client_secret': clientSecret,
  'grant_type' : 'client_credentials',
  'token_type': 'Bearer',
  'scope': scopesRequired
});
access_token = AccessToken.body.access_token;

Create an API client for the Configuration service

API.createClient('customerjourneymanagerconfiguration',
'/services/configuration/v1/api.raml');

Create a configuration object

The configuration object represents an Source system. For example, to retrieve campaigns and metrics from the SAP Hybris Marketing system, configure it using this service. Use the POST method to create a configuration object.

configuration_obj = customerjourneymanagerconfiguration.sourceSystems.post({ 
  "systemName":"Hybris Marketing",
  "hostName":"https://hybrismarketing.com",
  "authInfo":{
    "authType":"BASIC",
    "basic":{
      "userName":"username",
      "password":"password"
     }
  },
  "systemStatus":"ACTIVE"
}, {
  headers: {
    'Authorization': 'Bearer ' + access_token,
    'Content-type' : 'application/json'
           }
    }
  )

Retrieve the configuration object

Use the GET method to retrieve the Source system you created.

configuration_obj =  customerjourneymanagerconfiguration.sourceSystems.get(null, {
  headers: {
    'Authorization': 'Bearer ' + access_token,
    'Content-type' : 'application/json'
           }
    }
  )

Update the configuration object

Use the PUT method to update an existing Source system.

id=configuration_obj.body[0].id;
customerjourneymanagerconfiguration.sourceSystems.sourceSystemId(id).put({
  "systemName":"Hybris Marketing",
  "hostName":"https://mycjm.s4hana.ondemand.com",
  "authInfo":{
    "authType":"BASIC",
    "basic":{
      "userName":"username",
      "password":"password"
     }
  },
  "systemStatus":"ACTIVE"
}, {
  headers: {
    'Authorization': 'Bearer ' + access_token,
    'Content-type' : 'application/json'
  },
  query: {
    'partial' : true
  }
})

Retrieve the configuration object and verify update

Get the updated Source system to ensure that it was updated.

customerjourneymanagerconfiguration.sourceSystems.sourceSystemId(id).get(null, {
  headers: {
    'Authorization': 'Bearer ' + access_token,
    'Content-type' : 'application/json'
           }
    }
  )


Glossary

TermDescription
SourceA system in which an activity related to Customer Journey Manager occurs.


  • 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.