You are on page 1of 3

Create Maintenance Work Order Exceptions via REST API

REST API: <environment>/fscmRestApi/resources/latest/qualityIssues

Test User: Quality_engineer/Welcome1


User must have the privilege to create quality issues by service

Sample Payload – Resource Exception:

{
"Name": "Maintennce Exception By ID",
"QualityTypeCode" : "ORA_ENQ_MNT_RESOURCE",
"Severity" : "ORA_MEDIUM",
"Downtime" : 0,
"Source": "ORA_MAINTENANCE",
"OrganizationCode" : "MNTALM",
"ReportedBy": "MNT_QA",
"ReportedDate": "2021-07-22T12:00:00+00:00",
"WorkflowStatusCode": "ORA_ISSUE_EXCEP_OPEN",
"AffectedObjects":[
{
"SupportedEntityCode" : "ORA_WORK_OPERATION",
"ContextId" : 300100549061424
},
{
"SupportedEntityCode" : "ORA_RESOURCE",
"ContextCode": "I-Inspector",
"SubContextCode" : "MNTALM"
}]
}
Payload Attribute Level Description Allowed Values
QualityTypeCode Parent Resource The type of Lookup: ORA_ENQ_SOURCE
the exception Values:
• ORA_ENQ_MNT_RESOURCE
• ORA_ENQ_WORK_CENTER
• ORA_ENQ_MNT_COMPONENT
• ORA_ENQ_MNT_WORK_AREA
• ORA_ENQ_MNT_MISCELLANEOUS
• ORA_ENQ_MNT_SUPPLIER_OPERATION

Severity Parent Resource The severity Lookup: ORA_ENQ_SEVERITY


of the Values:
exception • ORA_HIGH
• ORA_MEDIUM
• ORA_LOW
• ORA_CRITICAL

Source Parent Resource Maintenance ORA_MAINTENANCE


is the
exception
source
WorkflowStatusCode Parent Resource Optionally ORA_ISSUE_EXCEP_OPEN is an example
you can send
a workflow
template id
or a
workflow
status code

SupportedEntityCode Child resource: For the Therefore, the supported entity codes are first
• AffectedObjects primary added as a child resource:
• Associates using a affected Lookup: ORA_ENQ_SUPPORTED_ENTITIES
primary and object, you Values and their associated IDs:
secondary are ORA_WORK_ORDER - 1001
affected objects referencing ORA_WORK_OPERATION - 1002
to the issue the Work ORA_RESOURCE - 1003
Order ORA_COMPONENT - 1004
operation ORA_WORK_AREA - 1005
ORA_WORK_CENTER - 1006
ORA_INSPECTION_RESULT - 1007
ORA_RECEIPT - 1008
ContextId Child resource: This will be Value will be the WO operation ID
AffectedObjects the Work
Order
operation ID
SupportedEntityCode Child resource: For the In this case, you could use the Resource code:
AffectedObjects secondary ORA_RESOURCE
affected
object, you
are
referencing
what the
exception is
for.

ContextCode Child resource: This will be Pass the Resource Code in this example. This
AffectedObjects the code of will be the code of the Resource setup in the
object you Organization
reference in
the entity
code
SubContextCode Child resource: This will be Pass the Org Code – the resource must be setup
AffectedObjects the in this Org
Organization
code

For the secondary affected object, you will select the Entity codes and then define the context code and sub-context
code for the Org.

You might also like