Fetches the workflow status for a specific invoice, including its current stage and approval progress.
Use when:
You need to check, display, or track the workflow status of an invoice, such as its approval stage, pending actions, or overall progress in the EIP system.
Trigger phrases: "invoice workflow status," "approval status of invoice," "track invoice progress," "fetch invoice workflow"
IMPORTANT:
- Requires valid user authentication and authorization headers.
- Invoice and job codes must match existing records in the EIP system.
- Cross-tool dependencies: May rely on master data for invoice, job, and company codes.
Headers required (auto-injected):
- Accept
- Accept-Language
- Access-Control-Allow-Headers
- Access-Control-Allow-Methods
- Access-Control-Allow-Origin
- AccessFlag
- Authorization
- Connection
- Content-Type
- DNT
- DOPTCode
- DTCode
- Identifiers
- LoginAuditNo
- Origin
- Referer
- Sec-Fetch-Dest
- Sec-Fetch-Mode
- Sec-Fetch-Site
- Signature
- User-Agent
- UserId
- isInternalUser
- isMobileApp
- sec-ch-ua
- sec-ch-ua-mobile
- sec-ch-ua-platform
Request body fields:
- DocumentNo: The full document number for the invoice (e.g., "LE180820 - 00/SI/000520").
- strJobCode: The job code associated with the invoice (e.g., "LE180820").
- InvoiceType: The type of invoice (e.g., "SI" for Sales Invoice).
- DTCode: The document type code (numeric).
- CompanyCode: The company code (numeric).
- UserId: The user’s unique identifier (numeric).
- InvoiceNo: The invoice number (e.g., "00/SI/000520").
- Doptlist: List of workflow option codes to filter or specify workflow stages (e.g., ["A", "C", "T", "S", "F", "V"]).
- intCompanyCode: The integer value for company code (should match CompanyCode).
- sourceCountry: Country identifier (numeric, e.g., 0 for default).
Response fields:
(Live sample not available. Based on context, typical fields may include:)
- status: Indicates if the request was successful (e.g., "Success" or "Failure").
- workflowStatus: The current status of the invoice in the workflow (e.g., "Pending Approval", "Approved", "Rejected").
- currentStage: The current step or stage in the workflow process.
- approverList: List of users or roles responsible for approving the invoice at each stage.
- pendingWith: The user or role currently holding the invoice for action.
- lastActionDate: The date and time of the last workflow action.
- remarks: Any comments or notes related to the workflow status.
- history: Chronological list of workflow actions taken, including user, action, and timestamp.
- errorMessage: If applicable, details of any error encountered.
Error handling:
- If the invoice number or job code does not exist, the response will indicate failure with an appropriate error message.
- If required headers or authentication are missing or invalid, the response will indicate unauthorized access.
- If the request body is incomplete or contains invalid data, the response will specify the missing or incorrect fields.
- If the workflow status cannot be retrieved due to system issues, a generic error message will be returned.
Rules:
- All fields in the request body must be provided and valid.
- Ensure user permissions are sufficient to access the requested invoice workflow status.
- Document every field in the live response when available.
- Do not use SAP codes or jargon; use plain English.