Skip to Content

Push a Sales Order Card to Your Mobile Device

Push a card to the mobile device by triggering an action in an external system.
You will learn
  • How to push a card to your mobile device from an external system
  • How to view and delete subscription cards on your mobile device
sandeep-tdsSandeep TDSAugust 12, 2021
Created by
sandeep-tds
August 16, 2020
Contributors
sandeep-tds
sandeep-tds

Prerequisites

Congratulations! You can now push cards to your Mobile Device effortlessly.

  • Step 1

    In the previous tutorial of this group, you created a card that will be used by the Sales Managers to Approve / Reject sales orders.

    In this tutorial, you will mimic Watson’s request by triggering a request from an external system. Once the request is created, Alice will receive a push notification.

  • Step 2
    1. Open your Mobile Services Cockpit.

      CPMS Cockpit
    2. Click SAP Mobile Cards.

      Mobile Cards Cockpit View
    3. Navigate to Service Keys tab and click + to create a new service key.

      Service Keys Tab

      > If you can’t see the Service Keys tab, refresh your page.

    4. Enter/Select the values as indicated in the table, and click OK.

      AliasRole
      RegisterCardServiceKeyregister_card
      New Service Keys

    You can now see the newly created service key in the table.

    Make a note of the Alias, API Key, and the URL for your service key. You will be using these values in an upcoming step.

    Service Keys Table
  • Step 3
    1. In the Mobile Services cockpit, Click Features tab → Push Notification.

      Push Notification Feature
    2. In the Push Registrations tab, make a note of your User Name. You will need it in an upcoming step.

      Push Notification Feature

      If you are unable to determine your User Name, use the Send Notification to send a custom message as a push notification.

  • Step 4
    1. Click Features Tab → Mobile Sample OData ESPM.

      Sample Data Feature
    2. Click V2.

      Sample Data Cockpit
    3. Access /SalesOrderHeaders Entity in the browser window that opens.

      Sample Data in Browser
    4. Make a note of a Sales Order ID. You will need it in the next step.

      Sales Order Headers
  • Step 5

    Make sure you are choosing the preferred tab above: Postman or cURL.

    In this step, you will make an HTTP Request. This knowledge is transferrable, i.e. you can implement this logic in your Web/Desktop/Mobile applications.

    1. Create your HTTP Request by using the following configuration:
      • Request Type & URL

      HTTP Method TypeURL
      POST<The URL you copied from the service key table>/mobileservices/origin/hcpms/CARDS/v1/register/templated
      • Authorization
      Authorization TypeUsernamePassword
      BASIC RegisterCardServiceKey <The API Key you copied from the service key table>
      • Headers
      KeyValue
      Content-Typeapplication/json
      • Body - Raw → JSON
      JSON
      Copy
      {
        "method": "REGISTER",
        "username": "<The User Name you copied from the Push Registration table>",
        "templateName": "Sales Push Card BAS",
        "parameters": {
          "SalesOrderID": "<The Sales Order Id you copied from the Sample OData Service>"
        }
      }
      
  • Step 6

    Make sure you are choosing the right device platform tab ( Android or iOS ) above.

    Before proceeding, ensure that you have created a Push Card by following this tutorial.

    1. Either terminate the app or send it to background.

      Android Background
    2. Upon a successful HTTP Request call, you will see a New card added notification; Tap on the notification to see thee card.

      Android Notification
    3. Tap on the card to to open it.

      Android Home
    4. You can now see a sales order card for the Sales Order ID you specified in the HTTPS request method.

      Android Pushed Card

    Which of the following attributes can be seen on the SalesOrder card?

Back to top