PwsGetTimeAlerts

Overview


This service is used to retrieve a list of time alerts (PwsTimeAlerts) for the resource. Alerts are generated for weeks containing rejected or incomplete time cards, draft time cards and missing time. This service can operate in two modes:

  • Return list of alerts. This returns identifying information about each alert, including the alert type as well as the week start date and total number of minutes to which the alert applies.
  • Return alert count only. This returns a simple count of the number of alerts for the resource.

Request Format


PwsGetTimeAlerts Request
  • PwsGetTimeAlerts
    • serviceRequest: PwsGetTimeAlertsRq
      • RequestId: Int32
      • SessionTicket: String
      • CountOnly: Boolean
      • IncludeDraftFlag: Boolean
      • IncludeMissingTimeFlag: Boolean
      • IncludeRejectedOrIncompleteFlag: Boolean
      • MinAlertsDate: DateTime
      • ResourceIdentity: PwsResourceRef
      • AlertsPeriodType: String
      • MissingTimeCalculateDailyFlag: Boolean

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.

SessionTicket

String

Yes 


Click here for more information.

ARgBFuS/0LDcPCTXeih6XQ==

CountOnly

Boolean

No 

false

If set to 'true', the web service will include only a count of time alerts. If set to 'false", the web service will return full details of the time alerts.

false

IncludeDraftFlag

Boolean

One of IncludeDraftFlag, IncludeMissingTimeFlag, and/or IncludeRejectedOrIncompleteFlag is required

false

If set to 'true', the web service will return draft time alerts.

true

IncludeMissingTimeFlag

Boolean

See InlcudeDraftFlag

false

If set to 'true', the web service will return missing time alerts.

true 

IncludeRejectedOrIncompleteFlag

Boolean

See IncludeDraftFlag

false

If set to 'true', the web service will return rejected or incomplete time alerts.

true

MinAlertsDate

DateTime

*** deprecated ***

*** deprecated ***

*** This field has been deprecated ***


ResourceIdentity

PwsResourceRef

Yes


The identity of the resource associated with the time alerts.


AlertsPeriodType

String

No

W

The alerts period type, valid values include:

"D" for day

"W" for week

"M" for month

"A" for accounting period

M

MissingTimeCalculateDailyFlag

Boolean

No

Installation's setting

Determines how missing time is calculated. If set to 'true', the web service will consider there to be missing time on a day if less hours were reported for the day than were expected. If 'false', a resource is not considered to have missing time unless the total hours reported for the week is less than what is expected for the entire week.

false

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:PwsGetTimeAlerts>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>ARgBFuS/0LDcPCTXeih6XQ==</req:SessionTicket>
            <tim:CountOnly>false</tim:CountOnly>
            <tim:IncludeDraftFlag>true</tim:IncludeDraftFlag>
            <tim:IncludeMissingTimeFlag>true</tim:IncludeMissingTimeFlag>
            <tim:IncludeRejectedOrIncompleteFlag>true</tim:IncludeRejectedOrIncompleteFlag>
            <tim:ResourceIdentity>
               <com:ResourceReferenceSystemId>IT (USA) - 10</com:ResourceReferenceSystemId>
            </tim:ResourceIdentity>
            <tim:AlertsPeriodType>M</tim:AlertsPeriodType>
            <tim:MissingTimeCalculateDailyFlag>false</tim:MissingTimeCalculateDailyFlag>
         </pws:serviceRequest>
      </pws:PwsGetTimeAlerts>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsGetTimeAlerts Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

Click here for more information.


ResponseId

Int32

Click here for more information.

Status

RequestStatus

Click here for more information.


ServerTimestampUtc

DateTime

Click here for more information.

2018-03-12T17:31:31.6073673Z 

TimeAlerts

PwsTimeAlerts

The full details of the time alerts.


Response Usage Example(s)


Example 01
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetTimeAlertsResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetTimeAlertsResult 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-12T17:31:31.6073673Z</ServerTimestampUtc>
            <a:TimeAlerts>
               <a:AlertCount i:nil="true"/>
               <a:Alerts>
                  <a:PwsTimeAlert>
                     <a:AlertType>R</a:AlertType>
                     <a:Minutes>150</a:Minutes>
                     <a:PeriodStartDate>2017-07-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>1</a:CardCount>
                  </a:PwsTimeAlert>
                  <a:PwsTimeAlert>
                     <a:AlertType>D</a:AlertType>
                     <a:Minutes>480</a:Minutes>
                     <a:PeriodStartDate>2016-12-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>3</a:CardCount>
                  </a:PwsTimeAlert>
                  <a:PwsTimeAlert>
                     <a:AlertType>D</a:AlertType>
                     <a:Minutes>180</a:Minutes>
                     <a:PeriodStartDate>2017-01-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>2</a:CardCount>
                  </a:PwsTimeAlert>
                  <a:PwsTimeAlert>
                     <a:AlertType>D</a:AlertType>
                     <a:Minutes>120</a:Minutes>
                     <a:PeriodStartDate>2017-07-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>9</a:CardCount>
                  </a:PwsTimeAlert>
                  <a:PwsTimeAlert>
                     <a:AlertType>D</a:AlertType>
                     <a:Minutes>120</a:Minutes>
                     <a:PeriodStartDate>2017-08-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>2</a:CardCount>
                  </a:PwsTimeAlert>
                  <a:PwsTimeAlert>
                     <a:AlertType>M</a:AlertType>
                     <a:Minutes>11040</a:Minutes>
                     <a:PeriodStartDate>2018-01-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>1</a:CardCount>
                  </a:PwsTimeAlert>
                  <a:PwsTimeAlert>
                     <a:AlertType>M</a:AlertType>
                     <a:Minutes>9600</a:Minutes>
                     <a:PeriodStartDate>2018-02-01T00:00:00Z</a:PeriodStartDate>
                     <a:CardCount>1</a:CardCount>
                  </a:PwsTimeAlert>
               </a:Alerts>
            </a:TimeAlerts>
         </PwsGetTimeAlertsResult>
      </PwsGetTimeAlertsResponse>
   </s:Body>
</s:Envelope>

PwsGetTimeAlerts - Common Errors and Warnings

ErrorNumber

ErrorCode

ErrorText

10103NothingToDoThere is nothing to do.
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.
57545ResourceNotFoundThe specified resource does not exist.