Development of a Client Application That Retrieves Award Scenarios for Approval For Award Tasks

If you are an SAP Ariba Sourcing user and have an external system that evaluates award scenarios which are submitted for Approval For Award tasks, you can use the following workflow to retrieve award scenarios.

  1. Event administrators create events from templates with Approval For Award tasks that have the External System Approval option set to Yes. An event administrator submits a scenario for awards, which causes the Approval For Award task to be submitted.

  2. The External Approval API for Sourcing and Supplier Management API client retrieves a list of sourcing Approval For Award tasks.

    Example:
    {{runtime_URL}}/changes?needTotal=true&realm=mySite&$filter=ApprovableType eq 'Sourcing' and 
    ApprovableSubType eq 'ApprovalForAward'
  3. For each task in the response, the client extracts the task ID (the approvableUniqueName).

    Example:
    [
        {
            "changeParameters": "{\"approvalRequestBaseId\":\"AAAAADPCWN6Zv\"}",
            "approvers": "[{\"type\":\"User\",\"uniqueName\":\"smith\"}]",
            "approvableUniqueName": "TSK5555",
            "realm": "mySite",
            "changeSequenceId": "11",
            "entityDetailMetadata": "",
            "changeType": "ApprovalRequestActivated",
            "restResourceName": "Task"
        },
    ...
    ]
  4. The client uses the approvableUniqueName to get the header information for each Approval For Award task.

    Example:
    {{runtime_URL}}/Task/TSK5555?realm=mySite
  5. The client determines if the task is active by checking if status is Active and altStatus is In Approval in the task response.

    Example:
    {
        "id": "TSK5555",
        "title": "Approval for RFP Award1",
        ...
        "beginDate": 1577433906636,
        "status": "Active",
        "altStatus": "In Approval",
        "displayStatus": "In Approval",
        ...
    }
    
  6. If the task is active, the client extracts the document ID for the event from the task response. The path to the document ID for the event is:

    document/content/documents/id

    The element in the documents array for the event also contains the following name/value pairs:

    "type": "Event"
    "entityType": "RFXDocument"

    For an example, see Entity_type and Entity_id Values.

  7. The client retrieves details for the event (RFXDocument) and requests scenario information by including the query string $select=scenario.

    Example:
    {{runtime_URL}}/RFXDocument/Doc8888888?realm=mySite&$select=scenario
  8. If the response contains a nonempty link element, the event contains 50 or more items. The client sends another request using the link value to retrieve the next page of data. The client repeats this step until the response contains an empty link element.

  9. (Optional) To get more information about items in the scenario, such as descriptions or the hierarchical structure, the client retrieves the RFXDocument details again and requests details for items by including the query string $select=items. The client uses the itemId field to correlate information in the response, such as the item hierarchy.

  10. (Optional) To get more information about awarded participants, such as address or registration status, the client retrieves the RFXDocument details again and requests details for participants by including the query string $select=invitedSuppliers. The client uses the supplierUniqueName and orgSystemId in the scenario information to correlate participants with invitedSupplier information as described in Item Detail and Item Hierarchy Determination.

  11. The client uses the /action endpoint of the External Approval API for Sourcing and Supplier Management to approve or deny the Approval for Award task.