Overview

A playbook is a digital canvas used to design and build a journey. It helps to orchestrate the various activities at different stages of a journey.

Use the Playbook service to:

  • Design, build, and monitor a customer journey.
  • Retrieve, update, and delete a Playbook.
  • Fetch all the Journeys.
  • Collaborate with SAP Jam users.

The Playbook service uses the Template service to fetch a list of templates for configuring a Journey.

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


API Reference

/playbooks

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

/playbooks

get

Retrieves a list of playbooks.

Accepted scopes:

  • hybris.playbook_view – Required to retrieve playbooks
post

Creates a playbook.

Accepted scopes:

  • hybris.playbook_manage – Required to create a playbook

/playbooks/{playbookId}

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

get

Retrieves a playbook.

Accepted scopes:

  • hybris.playbook_view – Required to retrieve a playbook
put

Updates a playbook.

Accepted scopes:

  • hybris.playbook_manage – Required to update a playbook
delete

Deletes a playbook.

Accepted scopes:

  • hybris.playbook_delete – Required to delete a playbook

/playbooks/{playbookId}/collaboration

get

Get collaboration details of a playbook

Accepted scopes:

  • hybris.playbook_view – Required to get collaboration details of a playbook

/playbooks/{playbookId}/achievabilityScore

get

Get achievability score for all goals of a playbook

Accepted scopes:

  • hybris.playbook_view – Required to get achievability score of a playbook

/playbooks/journeys

DEPRECATED

get

Retrieves a list of journeys.

Accepted scopes:

  • hybris.playbook_view – Required to retrieve journeys


Scopes in Playbook Service

Scopes prevent unauthorized access to the Playbook 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

These scopes are supported by the Playbook service:

ScopeDescription
hybris.playbook_viewUse this scope to view playbook.
hybris.playbook_manageUse this scope to create and modify existing playbook.
hybris.playbook_deleteUse this scope to delete existing playbook.


Create a Playbook

A playbook is a collection of stages that represents the customers lifecycle. Each stage can contain one or more activities. Use the POST method to create a playbook.

By default, the person who creates a playbook is the owner of the playbook. The owner can choose to assign another user as the owner of an activity within the playbook.

This example shows how to create a playbook.

Request

  • Method: POST
  • Request URL: https://api.beta.yaas.io/hybris/cjm-playbook/v1/playbooks
  • Content Type: application/json
  • Body: The request body must contain the field with key name name and owner
  • Example:
    { 
     "name":"Playbook for new product launch",
     "stages":[  
        {  
           "id":"1",
           "rank":1,
           "name":"Acquire",
           "description":"run various campaign to acquire customers",
           "targetGroupId":"1",
           "style":{  
              "height":"200",
              "width":"100",
              "minHeight":"200",
              "minWidth":"100",
              "left":"100",
              "top":"200",
              "backgroundColor":"3B5999"
           },
           "activities":[  
              {  
                 "id":"1",
                 "templateId":"1",
                 "rank":1,
                 "name":"Maruti Breeza Ad Campaign",
                 "description":"New Facebook Ad Page",
                 "entityId":"0000045309",
                 "owner":"abc.xyz@sap.com",
                 "edited":"false",
                 "targetGroupId":"1",
                 "style":{  
                    "height":"200",
                    "width":"100",
                    "minHeight":"200",
                    "minWidth":"100",
                    "left":"100",
                    "top":"200",
                    "backgroundColor":"3B5999"
                 }
              }
           ]
        }
     ],
     "journey":{  
        "name":"Maruti Vitara Breeza Launch",
        "description":"Launch of the New Vehicle Breeza",
        "journeyType":"STANDARD"
     },
     "owner":"abc.xyz@sap.com",
     "users":[  
        "abc.xyz@sap.com"
     ]
    }
    

Response

  • Status Code: 201

 


Get all Playbooks

This tutorial shows how to use a GET request to obtain all playbooks that belong to a user. Playbook owners can view the playbooks they create or playbooks to which they are assigned as an activity owner or viewer.

Request

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/cjm-playbook/v1/playbooks

Response

  • Status Code: 200
  • Example:
    {  
     "id":"59f250bb-1dfb-42ca-b37b-244359751b65",
     "journey":{  
        "description":"Launch of the New Vehicle Breeza",
        "journeyType":"STANDARD",
        "name":"Maruti Vitara Breeza Launch"
     },
     "metadata":{  
        "createdAt":"2016-11-18T13:00:28.532+0000",
        "modifiedAt":"2016-11-18T13:00:28.532+0000",
        "version":"1"
     },
     "name":"Playbook for new product launch",
     "owner":"abc.xyz@sap.com",
     "stages":[  
        {  
           "activities":[  
              {  
                 "description":"New Facebook Ad Page",
                 "edited":false,
                 "entityId":"0000045309",
                 "id":"ba1702f9-411e-4ce1-bca9-c40461307395",
                 "name":"Maruti Breeza Ad Campaign",
                 "owner":"abc.xyz@sap.com",
                 "rank":1,
                 "style":{  
                    "backgroundColor":"3B5999",
                    "height":200,
                    "left":100,
                    "minHeight":200,
                    "minWidth":100,
                    "top":200,
                    "width":100
                 },
                 "targetGroupId":"1",
                 "templateId":"1"
              }
           ],
           "description":"run various campaign to acquire customers",
           "id":"ee20f800-d3af-4120-b2c1-2fe639b0de88",
           "name":"Acquire",
           "rank":1,
           "style":{  
              "backgroundColor":"3B5999",
              "height":200,
              "left":100,
              "minHeight":200,
              "minWidth":100,
              "top":200,
              "width":100
           },
           "targetGroupId":"1"
        }
     ],
     "users":[  
        "abc.xyz@sap.com"
     ]
    }
    

     


Update a Playbook

To update a playbook, use a PUT request to send the entire playbook object with the updated fields. The service does not support partial updates. Activity owners can only update the activities they own. A playbook viewer can not update a playbook.

This example shows how to update a playbook.

Request

  • Method: PUT
  • Request URL: https://api.beta.yaas.io/hybris/cjm-playbook/v1/playbooks/{playbookId}
  • Content Type: application/json
  • Body: The request body must contain the field with key name name and owner
    {  
     "name":"Playbook for new product launch",
     "stages":[  
        {  
           "id":"1",
           "rank":1,
           "name":"Acquire",
           "description":"run various campaign to acquire customers",
           "targetGroupId":"1",
           "style":{  
              "height":"200",
              "width":"100",
              "minHeight":"200",
              "minWidth":"100",
              "left":"100",
              "top":"200",
              "backgroundColor":"3B5999"
           },
           "activities":[  
              {  
                 "id":"1",
                 "templateId":"1",
                 "rank":1,
                 "name":"Maruti Breeza Ad Campaign",
                 "description":"New Facebook Ad Page",
                 "entityId":"0000045309",
                 "owner":"abc.xyz@sap.com",
                 "edited":"false",
                 "targetGroupId":"1",
                 "style":{  
                    "height":"200",
                    "width":"100",
                    "minHeight":"200",
                    "minWidth":"100",
                    "left":"100",
                    "top":"200",
                    "backgroundColor":"3B5999"
                 }
              },
              {  
                 "id":"2",
                 "templateId":"2",
                 "rank":2,
                 "name":"Google Adwords",
                 "description":"Offer for Online Registrations",
                 "entityId":"0000046014",
                 "owner":"efg.uvw@sap.com",
                 "edited":"false",
                 "targetGroupId":"2",
                 "style":{  
                    "height":"200",
                    "width":"100",
                    "minHeight":"200",
                    "minWidth":"100",
                    "left":"100",
                    "top":"200",
                    "backgroundColor":"3B5999"
                 }
              }
           ]
        }
     ],
     "journey":{  
        "name":"Maruti Vitara Breeza Launch",
        "description":"Launch of the New Vehicle Breeza",
        "journeyType":"STANDARD"
     },
     "owner":"abc.xyz@sap.com",
     "users":[  
        "abc.xyz@sap.com",
        "def.uvw@sap.com",
        "ghi.rst@sap.com"
     ]
    }
    

Response

  • Status Code: 200

 


Get a Playbook by Playbook ID

This tutorial shows how to use a GET request to obtain a playbook by playbook ID. Playbook owners can view the playbooks they create, or playbooks to which they are assigned as an activity owner or viewer.

Request

  • Method: GET
  • Request URL: https://api.beta.yaas.io/hybris/cjm-playbook/v1/playbooks/{playbookId}

Response

  • Status Code: 200
  • Example:
    {  
     "id":"59f250bb-1dfb-42ca-b37b-244359751b65",
     "journey":{  
        "description":"Launch of the New Vehicle Breeza",
        "journeyType":"STANDARD",
        "name":"Maruti Vitara Breeza Launch"
     },
     "metadata":{  
        "createdAt":"2016-11-18T13:00:28.532+0000",
        "modifiedAt":"2016-11-18T13:00:28.532+0000",
        "version":"1"
     },
     "name":"Playbook for new product launch",
     "owner":"abc.xyz@sap.com",
     "stages":[  
        {  
           "activities":[  
              {  
                 "description":"New Facebook Ad Page",
                 "edited":false,
                 "entityId":"0000045309",
                 "id":"ba1702f9-411e-4ce1-bca9-c40461307395",
                 "name":"Maruti Breeza Ad Campaign",
                 "owner":"abc.xyz@sap.com",
                 "rank":1,
                 "style":{  
                    "backgroundColor":"3B5999",
                    "height":200,
                    "left":100,
                    "minHeight":200,
                    "minWidth":100,
                    "top":200,
                    "width":100
                 },
                 "targetGroupId":"1",
                 "templateId":"1"
              }
           ],
           "description":"run various campaign to acquire customers",
           "id":"ee20f800-d3af-4120-b2c1-2fe639b0de88",
           "name":"Acquire",
           "rank":1,
           "style":{  
              "backgroundColor":"3B5999",
              "height":200,
              "left":100,
              "minHeight":200,
              "minWidth":100,
              "top":200,
              "width":100
           },
           "targetGroupId":"1"
        }
     ],
     "users":[  
        "abc.xyz@sap.com"
     ]
    }
    

     


Delete a Playbook by Playbook ID

This tutorial shows how to use a DELETE request to delete a playbook of a user by playbook ID. Only the playbook owner can delete a playbook.

Request

  • Method: DELETE
  • Request URL: https://api.beta.yaas.io/hybris/cjm-playbook/v1/playbooks/{playbookId}

Response

  • Status Code: 204

 


Glossary

TermDescription
Customer Journey ManagerCustomer Journey Manager is a tactical tool that allows marketers to build, monitor, and optimize the activities at various stages of a customer life cycle. It helps them to enhance the key marketing performance indicators (KPIs) thus achieving the overall brand goal.
JourneyAn ordered set of stages, each comprising a set of activities, designed to achieve a business goal.
PlaybookA design-time tool used to create a journey.


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