PwsGetAlerts

Overview


This service is used to retrieve alerts for a specified resource. Alerts indicate that the resource has outstanding activity in need of attention, and include Draft, Missing and/or Rejected Time Alerts, Draft and/or Rejected Expense Alerts and Rejected Requested Time Off alerts.


Request Format


PwsGetAlerts Request
  • PwsGetAlerts
    • serviceRequest: PwsGetAlertsRq
      • RequestId: Int32
      • SessionTicket: String
      • CountOnlyFlag: Boolean
      • IncludeDraftTimeFlag: Boolean
      • IncludeMissingTimeFlag: Boolean
      • IncludeRejectedExpenseFlag: Boolean
      • IncludeRejectedOrIncompleteTimeFlag: Boolean
      • IncludeUnsubmittedExpenseFlag: Boolean
      • MinAlertsDate: DateTime
      • ResourceIdentity: PwsResourceRef
      • AlertsPeriodType: String
      • MissingTimeCalculateDailyFlag: Boolean
      • IncludeRejectedOrIncompleteTimeoffFlag: Boolean

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.

1

SessionTicket

String

Yes


Click here for more information.

ASRSfTVqwiAveqJtZvLffA==

CountOnlyFlag

Boolean

No

false

If set to 'true', the web service will return only the count of time, cost and time off alerts; if set to 'false' the web service will return full information about each alert

false

IncludeDraftTimeFlag

Boolean

No

false

If set to 'true', draft time card alerts will be returned

true

IncludeMissingTimeFlag

Boolean

No

false 

If set to 'true', missing time alerts will be returned.

false

IncludeRejectedExpenseFlag

Boolean

No

false 

If set to 'true', rejected expense alerts will be returned.

false

IncludeRejectedOrIncompleteTimeFlag

Boolean

No

false 

If set to 'true,  rejected or incomplete time card alerts will be returned.

true

IncludeUnsubmittedExpenseFlag

Boolean

No

false 


false

MinAlertsDate *** deprecated ***

DateTime

 *** deprecated ***

 *** deprecated ***

 *** deprecated ***

 

ResourceIdentity

PwsResourceRef

No


The resource identity when acting on behalf of, if not specified, the authenticated resource identity will be used.


AlertsPeriodType

String

No

 'W' for weekly

The alerts period type:

"D" for day,

"W" for week

"M" for month

"A" for accounting period

M

MissingTimeCalculateDailyFlag

Boolean

No

false

If set to 'true', missing time will be determined on a daily basis. That is, a missing time alert will be generated for any day on which the reported hours are exceeded by the working hours, even if for the week as a whole, the working hours were met.

false

IncludeRejectedOrIncompleteTimeoffFlag

Boolean

No

false

If set to 'true', rejected or incomplete time off alerts will be returned.

true

Note: At least one of IncludeDraftTimeFlag, IncludeMissingTimeFlag, IncludeRejectedExpenseFlag, IncludeRejectedOrIncompleteTimeFlag or IncludeUnsubmittedExpenseFlag or IncludeRejectedOrIncompleteTimeoffFlag must be 'true'.

Request Usage Example(s)


Example 01
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:tim="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsGetAlerts>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>ASRSfTVqwiAveqJtZvLffA==</req:SessionTicket>
            <tim:CountOnlyFlag>false</tim:CountOnlyFlag>
            <tim:IncludeDraftTimeFlag>true</tim:IncludeDraftTimeFlag>
            <tim:IncludeMissingTimeFlag>false</tim:IncludeMissingTimeFlag>
            <tim:IncludeRejectedExpenseFlag>false</tim:IncludeRejectedExpenseFlag>
            <tim:IncludeRejectedOrIncompleteTimeFlag>true</tim:IncludeRejectedOrIncompleteTimeFlag>
            <tim:IncludeUnsubmittedExpenseFlag>false</tim:IncludeUnsubmittedExpenseFlag>
            <tim:AlertsPeriodType>M</tim:AlertsPeriodType>
            <tim:MissingTimeCalculateDailyFlag>false</tim:MissingTimeCalculateDailyFlag>
            <tim:IncludeRejectedOrIncompleteTimeoffFlag>true</tim:IncludeRejectedOrIncompleteTimeoffFlag>
         </pws:serviceRequest>
      </pws:PwsGetAlerts>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsGetAlerts Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information.


ResponseId

Int32

Click here for more information

1

Status

RequestStatus

Click here for more information


ServerTimestampUtc

DateTime

Click here for more information

2018-03-15T19:19:18.0531862Z

CostAlerts

PwsCostAlerts

The complete information associated with cost alerts


TimeAlerts

PwsTimeAlerts

The complete information associated with time alerts 


TimeoffAlerts

PwsTimeoffAlert

The complete information associated with time off alerts


Response Usage Example(s)


Example 01
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetAlertsResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetAlertsResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-15T19:19:18.0531862Z</ServerTimestampUtc>
            <a:CostAlerts>
               <a:AlertCount i:nil="true"/>
               <a:Alerts>
                  <a:PwsCostAlert>
                     <a:AlertType>R</a:AlertType>
                     <a:CurrencyDecimalDigits>2</a:CurrencyDecimalDigits>
                     <a:DisbursedCurrencyCode>USD</a:DisbursedCurrencyCode>
                     <a:DisbursementTotal>213</a:DisbursementTotal>
                     <a:DocumentName>Expense report created 27 Feb 2018 - B</a:DocumentName>
                     <a:ExpenseDocumentIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                        <b:DocumentNumber>ER00722</b:DocumentNumber>
                        <b:ExpenseDocumentId i:nil="true"/>
                        <b:ExpenseDocumentUid>1152921504607683576</b:ExpenseDocumentUid>
                     </a:ExpenseDocumentIdentity>
                     <a:ReimbursementTotal>213</a:ReimbursementTotal>
                  </a:PwsCostAlert>
                  <a:PwsCostAlert>
                     <a:AlertType>D</a:AlertType>
                     <a:CurrencyDecimalDigits>2</a:CurrencyDecimalDigits>
                     <a:DisbursedCurrencyCode>USD</a:DisbursedCurrencyCode>
                     <a:DisbursementTotal>100</a:DisbursementTotal>
                     <a:DocumentName>Expense report created 15 Mar 2018</a:DocumentName>
                     <a:ExpenseDocumentIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                        <b:DocumentNumber>ER00726</b:DocumentNumber>
                        <b:ExpenseDocumentId i:nil="true"/>
                        <b:ExpenseDocumentUid>1152921504607683580</b:ExpenseDocumentUid>
                     </a:ExpenseDocumentIdentity>
                     <a:ReimbursementTotal>100</a:ReimbursementTotal>
                  </a:PwsCostAlert>
               </a:Alerts>
            </a:CostAlerts>
            <a:TimeAlerts>
               <a:AlertCount i:nil="true"/>
               <a:Alerts>
                  <a:PwsTimeAlert>
                     <a:AlertType>R</a:AlertType>
                     <a:Minutes>960</a:Minutes>
                     <a:PeriodStartDate>2018-03-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>2</a:CardCount>
                  </a:PwsTimeAlert>
               </a:Alerts>
            </a:TimeAlerts>
            <a:TimeoffAlerts>
               <a:AlertCount i:nil="true"/>
               <a:Alerts>
                  <a:PwsTimeoffAlert>
                     <a:AlertType>R</a:AlertType>
                     <a:BeginDate>2018-03-23T00:00:00Z</a:BeginDate>
                     <a:EndDate>2018-03-27T00:00:00Z</a:EndDate>
                  </a:PwsTimeoffAlert>
               </a:Alerts>
            </a:TimeoffAlerts>
         </PwsGetAlertsResult>
      </PwsGetAlertsResponse>
   </s:Body>
</s:Envelope>

PwsGetAlerts - Common Errors and Warnings


ErrorNumber

ErrorCode

ErrorText

20065InvalidValueForAlertsPeriodTypeSpecified value for alerts period type is invalid. Valid values are D for day, W for week, M for month and A for accounting period.