Create a Failure Event

You can use REST API to create a failure event with one or more associated failure instances. A failure event is always associated with a work order, and there can only be one failure event per work order.

Here's a typical application processing flow for the scenarios:

  1. You create a failure event with one or more failure instances.
  2. You may choose to update an existing failure event.
  3. You may choose to update an existing failure instance.
  4. You may choose to delete an existing failure event and all associated instances.
  5. You may choose to delete an existing failure instance.
  6. You may choose to load historical failure records from an external system.

Create a Failure Event with Multiple Failure Instances

In this scenario, you create a failure event with multiple failure instances. This type of scenario might occur when an asset experiences a complex multi-part failure.

Note:

When creating multiple failure instances, the combination of failure code, cause code, resolution code, and failed component asset number must be unique, as must the combination of failure code, cause code, and resolution code if there is no failed component item number or failed component asset number.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/assetFailureEvents"

Example Request

This table shows the typical attributes to create a failure event and failure instance.

Table -

Value Description
SourceSystemTypeCode This attribute is always ORA_INTERNAL or ORA_EXTERNAL. ORA_INTERNAL indicates that the failure event is linked to a work order in the Oracle Cloud Maintenance application, while ORA_EXTERNAL indicates that the failure event occurred in an external maintenance system.
TrackingObjectTypeCode Currently, the only option is ORA_WORK_ORDER. This attribute is only necessary when SourceSystemTypeCode is ORA_INTERNAL.
WorkOrderId ID of the work order to which the failure event is linked. This attribute is only necessary when SourceSystemTypeCode is ORA_INTERNAL. Note that WorkOrderNumber together with OrganizationCode can be passed instead of WorkOrderId.
WorkOrderNumber Number of the work order to which the failure event is linked. This attribute is only necessary when SourceSystemTypeCode is ORA_INTERNAL and WorkOrderId is not passed in. The OrganizationCode must also be passed in along with the WorkOrderNumber.
OrganizationCode Code that uniquely identifies the organization to which the WorkOrderNumber is associated. This value is only required when a WorkOrderNumber is also passed.
FailureDate Date and time when the asset failed or when failure was first discovered. This value is used to calculate important metrics such as time to repair and downtime.
AvailableDate Date and time when the asset is again available to use after failure is resolved. This value is used to calculate the technical downtime and availability of the asset. The Available Date must be later than the Failure Date.
AssetDownIndicator Indicates whether the asset can still be used despite the failure (for example, when there are redundant systems) or whether the failure results in downtime. If no value is passed, the default is value is Y indicating that the asset is down.
FailureCode Code indicating the unique failure mode or functional failure of the asset. This attribute is on the failure instance.

Note:

If the Failure Chains Required attribute = TRUE on the failure set associated to the asset on the work order, then Failure Code, Cause Code, and Resolution Code combinations are validated against valid Failure Chains defined for the applicable Failure Set.

Note:

ConditionEvents of type FAILURE, CAUSE, and RESOLUTION must validate against the ConditionEvents table.
CauseCode Code indicating the unique cause of failure or failure mechanism of the asset. A Cause Code cannot be entered without a Failure Code. This attribute is on the failure instance.

Note:

ConditionEvents of type FAILURE, CAUSE, and RESOLUTION must validate against the ConditionEvents table.
ResolutionCode Code indicating the unique method of resolution of the asset failure. A Resolution Code cannot be entered without a Cause Code. This attribute is on the failure instance.

Note:

ConditionEvents of type FAILURE, CAUSE, and RESOLUTION must validate against the ConditionEvents table.
FailedComponentItemNumber Unique alphanumeric identifier of the non-asset-tracked component part that caused the asset failure. This attribute is not passed if a FailedComponentAssetNumber is passed. This attribute is on the failure instance.
FailedComponentSerialNumber Unique alphanumeric serial identifier of the component part that caused the asset failure. This attribute is only used when a serialized, but not asset-tracked FailedComponentItemNumber is passed. This attribute is on the failure instance.

Note:

This is the same as the Inventory Item Number defined in the Inventory Item Master table.
FailedComponentAssetNumber Unique alphanumeric identifier of the asset-tracked component part that caused the asset failure. This attribute is on the failure instance.

Note:

This is the same as the Asset Number defined in the Assets table.
FailureComments Free-text information regarding the failure. This attribute is on the failure instance.
FailureSeverityCode Code indicating the perceived level of severity of a failure. This attribute is on the failure instance.

Note:

This must be a valid value in the ORA_CSE_FAILURE_SEVERITY lookup.
FailureStatusCode Code indicating the status of the failure lifecycle. This attribute is on the failure instance.

Note:

This must be a valid value in the ORA_CSE_FAILURE_STATUS lookup.
Here's an example of the request body in JSON format.
{
    "SourceSystemTypeCode": "ORA_INTERNAL",
    "TrackingObjectTypeCode": "ORA_WORK_ORDER",
    "WorkOrderId": 75476,
    "FailureDate": "2020-09-08T19:00:28+00:00",
    "failureInstances": [
        {
            "FailureCode": "FC1",
            "FailureComments": "Visible external scorching."
        },
        {
            "FailureCode": "FC2",
            "FailedComponentItemNumber": "ZS5-4 Storage Appliance"
        }
    ]
}

Example Response

Here's an example of the response body in JSON format.
{
    "FailureEventId": 300100564522935,
    "TrackingObjectTypeCode": "ORA_WORK_ORDER",
    "WorkOrderNumber": "FL208",
    "WorkOrderId": 75476,
    "WorkOrderDescription": "Priority 1",
    "OrganizationCode": null,
    "OrganizationId": null,
    "FailureDate": "2020-09-08T19:00:28+00:00",
    "AvailableDate": null,
    "AssetDownIndicator": "Y",
    "AssetNumber": "Forklift Asset 02",
    "AssetId": 300100541412517,
    "AssetDescription": "Forklift Asset 02",
    "ItemNumber": null,
    "ItemDescription": null,
    "ItemLongDescription": null,
    "FailureSetId": 300100555313756,
    "FailureSetCode": "FS003",
    "FailureSetDescription": "FS003",
    "FailureSetName": "FS003",
    "RepairCost": null,
    "SourceDocumentId": null,
    "SourceDocumentTypeCode": null,
    "SourceDocumentTypeName": null,
    "SourceSystemId": null,
    "SourceSystemTypeCode": "ORA_INTERNAL",
    "SourceSystemTypeName": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2021-12-06T10:52:21+00:00",
    "LastUpdateDate": "2021-12-06T10:52:21.135+00:00",
    "LastUpdateLogin": "D2754A9EB19D669AE053A9B1F20A593B",
    "LastUpdatedBy": "MNT_QA",
    "DaysBetweenFailure": null,
    "MeterUnitsBetweenFailure": null,
    "UOMCode": null,
    "UomName": null,
    "TrackingObjectType": "ORA_WORK_ORDER",
    "CompletionDate": null,
    "SourceSystem": null,
    "failureInstances": [
        {
            "CreatedBy": "MNT_QA",
            "CreationDate": "2021-12-06T10:52:21.136+00:00",
            "FailedComponentAssetNumber": null,
            "AssetNumber": null,
            "FailedComponentItemNumber": null,
            "FailedComponentItemId": null,
            "FailedComponentSerialNumber": null,
            "FailureComments": "Visible external scorching.",
            "FailureEventId": 300100564522935,
            "FailureInstanceId": 300100564522936,
            "LastUpdateDate": "2021-12-06T10:52:21.136+00:00",
            "LastUpdateLogin": "D2754A9EB19D669AE053A9B1F20A593B",
            "LastUpdatedBy": "MNT_QA",
            "FailureSeverityCode": null,
            "FailureStatusCode": null,
            "AssetId": null,
            "FailureName": "Failure Code 1",
            "FailureDescription": "Failure Code 1",
            "CauseDescription": null,
            "CauseName": null,
            "ResolutionDescription": null,
            "ResolutionName": null,
            "AssetDescription": null,
            "FailureCodeId": 300100555257834,
            "FailureCode": "FC1",
            "CauseCodeId": null,
            "CauseCode": null,
            "ResolutionCodeId": null,
            "ResolutionCode": null,
            "AssetDownFlag": null,
            "AvailableDate": null,
            "FailureDate": null,
            "RepairCost": null,
            "SourceDocumentId": null,
            "SourceDocumentTypeCode": null,
            "SourceSystemId": null,
            "SourceSystemType": null,
            "DaysBetweenFailure": null,
            "MeterUnitsBetweenFailure": null,
            "MeterUnitOfMeasure": null,
            "CompletionDate": null,
            "FailureCategoryCode": null,
            "FailureCategoryName": null,
            "CauseCategoryCode": null,
            "CauseCategoryName": null,
            "ResolutionCategoryCode": null,
            "ResolutionCategoryName": null,
            "ItemDescription": null,
            "ItemNumber": null,
            "ItemLongDescription": null,
            "FailedComponentItemDescription": null,
            "InventoryItemId": null,
            "ItemOrganizationId": null,
            "FailedComponentItemLongDescription": null,
            "WorkOrderId": null,
            "WorkOrderNumber": null,
            "WorkOrderDescription": null,
            "FailedComponentAssetDescription": null,
            "FailureSeverityName": null,
            "FailureStatusName": null,
            "AssetCriticalityName": null,
            "AssetCriticalityCode": null,
            "ItemOrganizationCode": null,
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522936",
                    "name": "failureInstances",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522936",
                    "name": "failureInstances",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
                    "name": "assetFailureEvents",
                    "kind": "item"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522936/child/rootCauses",
                    "name": "rootCauses",
                    "kind": "collection"
                }
            ]
        },
        {
            "CreatedBy": "MNT_QA",
            "CreationDate": "2021-12-06T10:52:21.140+00:00",
            "FailedComponentAssetNumber": null,
            "AssetNumber": null,
            "FailedComponentItemNumber": null,
            "FailedComponentItemId": 300100170554049,
            "FailedComponentSerialNumber": null,
            "FailureComments": null,
            "FailureEventId": 300100564522935,
            "FailureInstanceId": 300100564522938,
            "LastUpdateDate": "2021-12-06T10:52:21.140+00:00",
            "LastUpdateLogin": "D2754A9EB19D669AE053A9B1F20A593B",
            "LastUpdatedBy": "MNT_QA",
            "FailureSeverityCode": null,
            "FailureStatusCode": null,
            "AssetId": null,
            "FailureName": "Failure Code 2",
            "FailureDescription": "Failure Code 2",
            "CauseDescription": null,
            "CauseName": null,
            "ResolutionDescription": null,
            "ResolutionName": null,
            "AssetDescription": null,
            "FailureCodeId": 300100555257838,
            "FailureCode": "FC2",
            "CauseCodeId": null,
            "CauseCode": null,
            "ResolutionCodeId": null,
            "ResolutionCode": null,
            "AssetDownFlag": null,
            "AvailableDate": null,
            "FailureDate": null,
            "RepairCost": null,
            "SourceDocumentId": null,
            "SourceDocumentTypeCode": null,
            "SourceSystemId": null,
            "SourceSystemType": null,
            "DaysBetweenFailure": null,
            "MeterUnitsBetweenFailure": null,
            "MeterUnitOfMeasure": null,
            "CompletionDate": null,
            "FailureCategoryCode": null,
            "FailureCategoryName": null,
            "CauseCategoryCode": null,
            "CauseCategoryName": null,
            "ResolutionCategoryCode": null,
            "ResolutionCategoryName": null,
            "ItemDescription": null,
            "ItemNumber": null,
            "ItemLongDescription": null,
            "FailedComponentItemDescription": null,
            "InventoryItemId": null,
            "ItemOrganizationId": null,
            "FailedComponentItemLongDescription": null,
            "WorkOrderId": null,
            "WorkOrderNumber": null,
            "WorkOrderDescription": null,
            "FailedComponentAssetDescription": null,
            "FailureSeverityName": null,
            "FailureStatusName": null,
            "AssetCriticalityName": null,
            "AssetCriticalityCode": null,
            "ItemOrganizationCode": null,
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522938",
                    "name": "failureInstances",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522938",
                    "name": "failureInstances",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
                    "name": "assetFailureEvents",
                    "kind": "item"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522938/child/rootCauses",
                    "name": "rootCauses",
                    "kind": "collection"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
            "name": "assetFailureEvents",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
            "name": "assetFailureEvents",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances",
            "name": "failureInstances",
            "kind": "collection"
        }
    ]
}

Update a Failure Event

In this scenario, you update an existing failure event. Specifically, this API call updates the failure event with a value for the Available Date when the asset is available to use after a failure is fixed.

Example URL

Use this resource URL format.

PATCH

curl -u username:password -X PATCH -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/assetFailureEvents/FailureEventId"

Example Request

Here's an example of the request body in JSON format.
{
    "AvailableDate": "2020-09-09T19:00:28+00:00"
}

Example Response

Here's an example of the response body in JSON format.
{
    "FailureEventId": 300100564522935,
    "TrackingObjectTypeCode": "ORA_WORK_ORDER",
    "WorkOrderNumber": "FL208",
    "WorkOrderId": 75476,
    "WorkOrderDescription": "Priority 1",
    "OrganizationCode": "MNTALM",
    "OrganizationId": 300100113363336,
    "FailureDate": "2020-09-08T19:00:28+00:00",
    "AvailableDate": "2020-09-09T19:00:28+00:00",
    "AssetDownIndicator": "Y",
    "AssetNumber": "Forklift Asset 02",
    "AssetId": 300100541412517,
    "AssetDescription": "Forklift Asset 02",
    "ItemNumber": "SAPS-WRH-Forklift",
    "ItemDescription": "Warehouse Forklift",
    "ItemLongDescription": null,
    "FailureSetId": 300100555313756,
    "FailureSetCode": "FS003",
    "FailureSetDescription": "FS003",
    "FailureSetName": "FS003",
    "RepairCost": null,
    "SourceDocumentId": null,
    "SourceDocumentTypeCode": null,
    "SourceDocumentTypeName": null,
    "SourceSystemId": null,
    "SourceSystemTypeCode": "ORA_INTERNAL",
    "SourceSystemTypeName": "Internal",
    "CreatedBy": "MNT_QA",
    "CreationDate": "2021-12-06T10:52:21+00:00",
    "LastUpdateDate": "2021-12-06T10:54:09+00:00",
    "LastUpdateLogin": "D2754A9EB1BF669AE053A9B1F20A593B",
    "LastUpdatedBy": "MNT_QA",
    "DaysBetweenFailure": null,
    "MeterUnitsBetweenFailure": null,
    "UOMCode": null,
    "UomName": null,
    "TrackingObjectType": "ORA_WORK_ORDER",
    "CompletionDate": null,
    "SourceSystem": null,
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
            "name": "assetFailureEvents",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
            "name": "assetFailureEvents",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances",
            "name": "failureInstances",
            "kind": "collection"
        }
    ]
}

Update a Failure Instance

In this scenario, you update an existing failure instance. Specifically, this API call will update the failure instance with values for Cause Code and Resolution Code. It's a commonly expected scenario that failure events and failure instances will be created with the failure date and failure code, but the cause code and resolution code will not be known and cannot be added to the failure records until after the diagnosis and repair of the asset is complete.

Example URL

Use this resource URL format.

PATCH

curl -u username:password -X PATCH -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/assetFailureEvents/FailureEventId/child/failureInstances/FailureInstanceId"

Example Request

Here's an example of the request body in JSON format.

{
    "CauseCode": "CC4",
    "ResolutionCode": "RC4"
}

Example Response

Here's an example of the response body in JSON format.
{
    "CreatedBy": "MNT_QA",
    "CreationDate": "2021-12-06T10:59:50+00:00",
    "FailedComponentAssetNumber": null,
    "AssetNumber": "Forklift Asset 02",
    "FailedComponentItemNumber": null,
    "FailedComponentItemId": null,
    "FailedComponentSerialNumber": null,
    "FailureComments": "Visible external scorching.",
    "FailureEventId": 300100564522935,
    "FailureInstanceId": 300100564522936,
    "LastUpdateDate": "2021-12-06T10:59:50.001+00:00",
    "LastUpdateLogin": "D2754A5A5F28667FE053A9B1F20A95E6",
    "LastUpdatedBy": "MNT_QA",
    "FailureSeverityCode": null,
    "FailureStatusCode": null,
    "AssetId": 300100541412517,
    "FailureName": "Failure Code 1",
    "FailureDescription": "Failure Code 1",
    "CauseDescription": "Cause Code 4",
    "CauseName": "Cause Code 4",
    "ResolutionDescription": "RC4",
    "ResolutionName": "RC4",
    "AssetDescription": "Forklift Asset 02",
    "FailureCodeId": 300100555257834,
    "FailureCode": "FC1",
    "CauseCodeId": 300100555258053,
    "CauseCode": "CC4",
    "ResolutionCodeId": 300100555258173,
    "ResolutionCode": "RC4",
    "AssetDownFlag": true,
    "AvailableDate": "2020-09-09T19:00:28+00:00",
    "FailureDate": "2020-09-08T19:00:28+00:00",
    "RepairCost": null,
    "SourceDocumentId": null,
    "SourceDocumentTypeCode": null,
    "SourceSystemId": null,
    "SourceSystemType": "ORA_INTERNAL",
    "DaysBetweenFailure": null,
    "MeterUnitsBetweenFailure": null,
    "MeterUnitOfMeasure": null,
    "CompletionDate": null,
    "FailureCategoryCode": null,
    "FailureCategoryName": null,
    "CauseCategoryCode": null,
    "CauseCategoryName": null,
    "ResolutionCategoryCode": null,
    "ResolutionCategoryName": null,
    "ItemDescription": "Warehouse Forklift",
    "ItemNumber": "SAPS-WRH-Forklift",
    "ItemLongDescription": null,
    "FailedComponentItemDescription": null,
    "InventoryItemId": 300100541389067,
    "ItemOrganizationId": 300100113363336,
    "FailedComponentItemLongDescription": null,
    "WorkOrderId": 75476,
    "WorkOrderNumber": "FL208",
    "WorkOrderDescription": "Priority 1",
    "FailedComponentAssetDescription": null,
    "FailureSeverityName": null,
    "FailureStatusName": null,
    "AssetCriticalityName": null,
    "AssetCriticalityCode": null,
    "ItemOrganizationCode": "MNTALM",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522936",
            "name": "failureInstances",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522936",
            "name": "failureInstances",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935",
            "name": "assetFailureEvents",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564522935/child/failureInstances/300100564522936/child/rootCauses",
            "name": "rootCauses",
            "kind": "collection"
        }
    ]
}

Delete a Failure Instance

In this scenario, you delete an existing failure instance. It's expected that deleting failure instances should be extremely rare, and only to recover from accidental record creation. In cases where failure is reported but it's determined that there was no failure, it's recommended to use the failure code linked to the profile option ORA_CSE_NO_FAULT_FOUND_CODE rather than deleting the failure instance.

Example URL

Use this resource URL format.

DELETE

curl -u username:password -X DELETE -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d "https://servername/fscmRestApi/resources/version/assetFailureEvents/FailureEventId/child/failureInstances/FailureInstanceId"

Example Request

No payload is required.

Example Response

No response is returned.

Delete a Failure Event

In this scenario, you delete an existing failure event. It's expected that deleting failure events should be extremely rare, and only to recover from accidental record creation. In cases where failure is reported but it's determined that there was no failure, it's recommended to use the failure code linked to profile option ORA_CSE_NO_FAULT_FOUND_CODE rather than deleting the failure record.

Example URL

Use this resource URL format.

DELETE

curl -u username:password -X DELETE -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d "https://servername/fscmRestApi/resources/version/assetFailureEvents/FailureEventId"

Example Request

No payload is required.

Example Response

No response is returned.

Load Historical Failure Records from an External System

In this scenario, the goal is to load historical failure events and instances from an external system. This might be a one-time load from a legacy system no longer in use, or could be ongoing integration with other failure tracking systems.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/assetFailureEvents"

Example Request

This table shows the typical attributes to create a failure event and failure instance.

Table -

Value Description
SourceSystemTypeCode This attribute is always ORA_INTERNAL or ORA_EXTERNAL. ORA_INTERNAL indicates that the failure event is linked to a work order in the Oracle Cloud Maintenance application, while ORA_EXTERNAL indicates that the failure event occurred in an external maintenance system.
SourceSystem Unique value defining the external maintenance system from which the failure records were sent. Must validate against hz_orig_systems_vl.ORIG_SYSTEM_ID table. This is mandatory when SourceSystemTypeCode is ORA_EXTERNAL.
SourceSystemId Internal system identifier for the SourceSystem. This is only required when SourceSystemTypeCode is ORA_EXTERNAL.
SourceDocumentId The identifier for the failure event in the external maintenance system from which the failure records were sent. This is mandatory when SourceSystemTypeCode is ORA_EXTERNAL.
AssetId Unique system-defined identifier for the failed asset. This is mandatory when SourceSystemTypeCode is ORA_EXTERNAL and AssetNumber is not passed. When SourceSystemTypeCode is ORA_INTERNAL, AssetId value is determined from the asset on WorkOrderId.
AssetNumber Unique business-defined identifier for the failed asset. The AssetNumber must match a valid value in the Fusion Cloud Maintenance Asset table. This is mandatory when SourceSystemTypeCode is ORA_EXTERNAL and AssetId is not passed. When SourceSystemTypeCode is ORA_INTERNAL, AssetNumber value is determined from the asset on the WorkOrderId.
FailureDate Date and time when the asset failed or when failure was first discovered. This value is used to calculate important metrics such as time to repair and downtime.
AvailableDate Date and time when the asset is again available to use after the failure is resolved. Note that this is not necessarily the same as the work order completion date as an asset may require additional time to reboot, heat up or otherwise be available to use. This value is used to calculate the technical downtime and availability of the asset. The Available Date must be later than the Failure Date.
CompletionDate Date and time when the asset failure was resolved through repair, replacement, or other means. Note that this is not necessarily the same date and time as the Available Date, but more closely corresponds to the work order completion date for ORA_INTERNAL failure events. This attribute is only passed when SourceSystemTypeCode is ORA_EXTERNAL.
AssetDownIndicator Indicates whether the asset can still be used despite the failure (for example, when there are redundant systems) or whether the failure results in downtime. If no value is passed, the default is value is Y, indicating that the asset is down.
RepairCost The cost to repair the item, generally the sum of material and labor costs. This attribute is only passed when SourceSystemTypeCode is ORA_EXTERNAL.
DaysBetweenFailure The days between this failure event and the preceding one, or the days between this failure event and the asset in-service date if there were no prior failures. This attribute is only passed when SourceSystemTypeCode is ORA_EXTERNAL.
MeterUnitsBetweenFailure Meter units (for example, miles, operating hours, trips) between this failure event and the preceding one, or the meter units between this failure event and the initial meter reading if there were no prior failures. This attribute is only passed when SourceSystemTypeCode is ORA_EXTERNAL.
UnitOfMeasure The code for the unit of measure corresponding to the MeterUnitsBetweenFailure attribute. The code must be a valid UOM lookup defined in the lookups table. This attribute is only passed when SourceSystemTypeCode is ORA_EXTERNAL.
FailureCode Code indicating the unique failure mode or functional failure of the asset. This attribute is on the failure instance.

Note:

If the Failure Chains Required attribute = TRUE on the failure set associated to the asset on the work order, then Failure Code, Cause Code, and Resolution Code combinations are validated against valid Failure Chains defined for the applicable Failure Set.

Note:

ConditionEvents of type FAILURE, CAUSE, and RESOLUTION must validate against the ConditionEvents table.
CauseCode Code indicating the unique cause of failure or failure mechanism of the asset. A Cause Code cannot be entered without a Failure Code. This attribute is on the failure instance.

Note:

ConditionEvents of type FAILURE, CAUSE, and RESOLUTION must validate against the ConditionEvents table.
ResolutionCode Code indicating the unique method of resolution of the asset failure. A Resolution Code cannot be entered without a Cause Code. This attribute is on the failure instance.

Note:

ConditionEvents of type FAILURE, CAUSE, and RESOLUTION must validate against the ConditionEvents table.
FailedComponentItemNumber Unique alphanumeric identifier of the non-asset-tracked component part that caused the asset failure. This attribute is not passed if a FailedComponentAssetNumber is passed. This attribute is on the failure instance.

Note:

This is the same as the Inventory Item Number defined in the Inventory Item Master table.
FailedComponentSerialNumber Unique alphanumeric serial identifier of the component part that caused the asset failure. This attribute is only used when a serialized, but not asset-tracked FailedComponentItemNumber, is passed. This attribute is on the failure instance.
FailedComponentAssetNumber Unique alphanumeric identifier of the asset-tracked component part that caused the asset failure. This attribute is on the failure instance.n

Note:

This is the same as the Asset Number defined in the Assets table.
FailureComments Free-text information provided regarding the failure. This attribute is on the failure instance.
FailureSeverityCode Code indicating the perceived level of severity of a failure. This attribute is on the failure instance.

Note:

This must be a valid value in the ORA_CSE_FAILURE_SEVERITY lookup.
FailureStatusCode Code indicating the status of the failure lifecycle. This attribute is on the failure instance.

Note:

This must be a valid value in the ORA_CSE_FAILURE_STATUS lookup.

Here's an example of the request body in JSON format.

{
    "SourceSystemTypeCode": "ORA_EXTERNAL",
    "SourceSystem": "SAP",
    "SourceSystemId": 300100029025576,
    "SourceDocumentTypeCode": "ORA_WORK_ORDER",
    "SourceDocumentId": "CWO-12221",
    "AssetId": 300100169948273,
    "FailureDate": "2020-09-08T19:00:28+00:00",
    "AvailableDate": "2020-09-09T19:10:28+00:00",
    "failureInstances": [
        {
            "FailureCode": "FC1",
            "CauseCode": "CC1",
            "ResolutionCode": "RC1"
        }
    ]

}

Example Response

Here's an example of the response body in JSON format.

{
    "FailureEventId": 300100564640198,
    "TrackingObjectTypeCode": null,
    "WorkOrderNumber": null,
    "WorkOrderId": null,
    "WorkOrderDescription": null,
    "OrganizationCode": null,
    "OrganizationId": null,
    "FailureDate": "2020-09-08T19:00:28+00:00",
    "AvailableDate": "2020-09-09T19:10:28+00:00",
    "AssetDownIndicator": "Y",
    "AssetNumber": "MNTCDRMASSET01",
    "AssetId": 300100169948273,
    "AssetDescription": "MNTCDRMASSET01",
    "ItemNumber": null,
    "ItemDescription": null,
    "ItemLongDescription": null,
    "FailureSetId": 300100555313756,
    "FailureSetCode": "FS003",
    "FailureSetDescription": "FS003",
    "FailureSetName": "FS003",
    "RepairCost": null,
    "SourceDocumentId": "CWO-12221",
    "SourceDocumentTypeCode": "ORA_WORK_ORDER",
    "SourceDocumentTypeName": null,
    "SourceSystemId": 100000012259015,
    "SourceSystemTypeCode": "ORA_EXTERNAL",
    "SourceSystemTypeName": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2021-12-06T17:12:43+00:00",
    "LastUpdateDate": "2021-12-06T17:12:45.065+00:00",
    "LastUpdateLogin": "D2755102A80E66AAE053A9B1F20A2A7F",
    "LastUpdatedBy": "MNT_QA",
    "DaysBetweenFailure": null,
    "MeterUnitsBetweenFailure": null,
    "UOMCode": null,
    "UomName": null,
    "TrackingObjectType": null,
    "CompletionDate": null,
    "SourceSystem": "SAP",
    "failureInstances": [
        {
            "CreatedBy": "MNT_QA",
            "CreationDate": "2021-12-06T17:12:45.065+00:00",
            "FailedComponentAssetNumber": null,
            "AssetNumber": null,
            "FailedComponentItemNumber": null,
            "FailedComponentItemId": null,
            "FailedComponentSerialNumber": null,
            "FailureComments": null,
            "FailureEventId": 300100564640198,
            "FailureInstanceId": 300100564640217,
            "LastUpdateDate": "2021-12-06T17:12:45.066+00:00",
            "LastUpdateLogin": "D2755102A80E66AAE053A9B1F20A2A7F",
            "LastUpdatedBy": "MNT_QA",
            "FailureSeverityCode": null,
            "FailureStatusCode": null,
            "AssetId": null,
            "FailureName": "Failure Code 1",
            "FailureDescription": "Failure Code 1",
            "CauseDescription": "Cause Code 1",
            "CauseName": "Cause Code 1",
            "ResolutionDescription": "RC1",
            "ResolutionName": "RC1",
            "AssetDescription": null,
            "FailureCodeId": 300100555257834,
            "FailureCode": "FC1",
            "CauseCodeId": 300100555257950,
            "CauseCode": "CC1",
            "ResolutionCodeId": 300100555258073,
            "ResolutionCode": "RC1",
            "AssetDownFlag": null,
            "AvailableDate": null,
            "FailureDate": null,
            "RepairCost": null,
            "SourceDocumentId": null,
            "SourceDocumentTypeCode": null,
            "SourceSystemId": null,
            "SourceSystemType": null,
            "DaysBetweenFailure": null,
            "MeterUnitsBetweenFailure": null,
            "MeterUnitOfMeasure": null,
            "CompletionDate": null,
            "FailureCategoryCode": null,
            "FailureCategoryName": null,
            "CauseCategoryCode": null,
            "CauseCategoryName": null,
            "ResolutionCategoryCode": null,
            "ResolutionCategoryName": null,
            "ItemDescription": null,
            "ItemNumber": null,
            "ItemLongDescription": null,
            "FailedComponentItemDescription": null,
            "InventoryItemId": null,
            "ItemOrganizationId": null,
            "FailedComponentItemLongDescription": null,
            "WorkOrderId": null,
            "WorkOrderNumber": null,
            "WorkOrderDescription": null,
            "FailedComponentAssetDescription": null,
            "FailureSeverityName": null,
            "FailureStatusName": null,
            "AssetCriticalityName": null,
            "AssetCriticalityCode": null,
            "ItemOrganizationCode": null,
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198/child/failureInstances/300100564640217",
                    "name": "failureInstances",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198/child/failureInstances/300100564640217",
                    "name": "failureInstances",
                    "kind": "item"
                },
                {
                    "rel": "parent",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198",
                    "name": "assetFailureEvents",
                    "kind": "item"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198/child/failureInstances/300100564640217/child/rootCauses",
                    "name": "rootCauses",
                    "kind": "collection"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198",
            "name": "assetFailureEvents",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198",
            "name": "assetFailureEvents",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://servername/fscmRestApi/resources/version/assetFailureEvents/300100564640198/child/failureInstances",
            "name": "failureInstances",
            "kind": "collection"
        }
    ]
}