Logging User Edits

An administrator can use their browser's developer tools and the Kibo Composable Commerce Platform (KCCP) API to investigate which user first configured a particular setting or which user was the most recent to update the setting.

Using Dev Tools and the API

You must have a modern web browser with Dev Tools to follow this process.

This example is for a fulfillment setting in the site's General Settings, but the same steps can be used for configurations on orders, locations, or other elements elsewhere in the Admin interface as long as you can identify the proper function to filter for.

  1. In your web browser, turn on your Dev Tools and select the Network tab.
  2. Go to System > Settings  > General in KCCP.
  3. In Dev Tools > Network, filter for admin/app/fulfillmentSettings/read.
  4. Select the admin/app/fulfillmentSettings/readentry.

    The browser Dev Tools application with callouts for the Network and Fulfillment Settings Read entry

  5. Click the Response tab for the call.

    The browser Dev Tools application with a callout for the Response tab

  6. Copy the JSON response and paste it into the editor of your choice to make it more readable.
    {
       "success": true,
       "total": 1,
       "items": {
          "bpmConfiguration": {},
          "auditInfo": {
             "updateDate": "2021-03-09T15:48:08.442Z",
             "createDate": "2021-04-21T16:53:28.285Z",
             "updateBy": "aaaaaa000000aaaaaa000000",
             "createBy": "bbbbbb111111bbbbbbb11111"
          },
          "fulfillmentJobSettings": {
             "pickupReminderJob": {
                "isEnabled": true,
                "interal": 60
             },
             "releaseBackorderJob": {
              "isEnabled": true,
                "interval": 5
             }
          },
          "shipToStore": {
             "isEnabled": true,
             "alwaysCreateTransferShipments": false,
             "shippingMethod": {},
             "cancellation": {
                "onParentShipment": false,
                "restrictedSteps": \[\]
             }
          },
          "fulfillerSettings": {
             "editShipment": true
          },
          "actionOnBOPISReject": "CANCEL"
       }
    }
  7. This response will include audit information about the first user that created the settings (createBy) and the most recent user that updated the settings (updateBy). The values of these fields are internal user IDs.
          "auditInfo": {
             "updateDate": "2021-03-09T15:48:08.442Z",
             "createDate": "2021-04-21T16:53:28.285Z",
             "updateBy": "aaaaaa000000aaaaaa000000",
             "createBy": "bbbbbb111111bbbbbbb11111"
          },
  8. Use the GetUser API call to filter for the user with the desired ID.

The response from the GetUser call will give you the appropriate user account information.

Note that sometimes the initial create or update request for the resource was made by an application instead of a user, in which case createBy or updateBy will be the ID of the application.

Audit Information in Other APIs

The audit information is also returned in the responses of other API calls throughout the KCCP system, allowing the updateBy and createBy user information to be retrieved without developer tools for resources such as orders, shipments, etc.

For instance, if you make a GET call to the Order API and receive order information, then auditInfo will be included in the response body and the ID of the user (or application) that created the order and last updated it can then be used for the GetUser API call.

See the API documentation of the desired resource to confirm whether audit information is supported for that object.