Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This web service inserts or updates a single resource based on a detailed user resource structure (PwsResourceDetail). The service returns the identity (PwsResourceRef) of the resource that has been inserted or updated. The caller can optionally request that the full resource detail (PwsResourceElement) be included in the response.  To create a new resource, a user must exists to be associated this new resource. 

Request Format


PwsSaveResourceRq
Panel
titlePwsSaveResourceRq
PwsSaveResource Request
  • PwsSaveResource
    • serviceRequest: PwsSaveResource
      ExpenseApprovalUserIdentityClearFlag
      • ExpenseApprovalUserClearFlag: Boolean
      ExpenseEntryDelegateUserIdentityClearFlag
      • ExpenseEntryDelegateUserClearFlag: Boolean
      ExpenseReportVendorIdentityClearFlag
      • ExpenseReportVendorClearFlag: Boolean
      • FullDetailFlag: Boolean
      ManagerUserIdentityClearFlag
      • ManagerUserClearFlag: Boolean
      • PurgeFutureResourceHistoryFlag: Boolean
      • RdcExceptionClearFlag: Boolean
      RequestedTimeOffApprovalUserIdentityClearFlag
      • RequestedTimeOffApprovalUserClearFlag: Boolean
      • ResetCalendarAuthenticationTokenFlag: Boolean
      • Resource: PwsResourceDetail
      • ResourceTimestamp: String
      SkillApprovalUserIdentityClearFlag
      • SkillApprovalUserClearFlag: Boolean
      SubcontractorInvoiceVendorIdentityClearFlag
      • SubcontractorInvoiceVendorClearFlag: Boolean
      • TimeAndCostGlccOverrideClearFlag: Boolean
      TimeEntryDelegateUserIdentityClearFlag
      • TimeEntryDelegateUserClearFlag: Boolean
      TimecardApprovalUserIdentityClearFlag
      • TimecardApprovalUserClearFlag: Boolean
      • WorkingScheduleOverrideClearFlag: Boolean
      • SetNullValuesFromResourceTypeFlag: 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.

AeKkhtiAVtOJRHdW+Dy08Q==
AllowDuplicateInitialsFlagBooleanNofalseIf set to 'true', the service will allow the resource to be added even if another resource with the same initials already exists in the installation.
true

ExpenseApprovalUserIdentityClearFlagExpenseApprovalUserClearFlag

Boolean

No

false

The user identity of this If set to 'true', the resource's expense approverapproval user will be cleared.

false

ExpenseEntryDelegateUserIdentityClearFlagExpenseEntryDelegateUserClearFlag

Boolean

No

false

The identity of this If set to 'true', the resource's delegated user for expense entry delegate user will be cleared.

false

ExpenseReportVendorIdentityClearFlagExpenseReportVendorClearFlag

Boolean

No

false

If specified, this set to 'true', the resource's expense reports report vendor will be directly paid to this vendorcleared.

false

FullDetailFlag

Boolean

No

false

If set to 'true', include full detailed resource element in response.

true

ManagerUserIdentityClearFlagManagerUserClearFlag

Boolean

No

false

The user identity of this If set to 'true', the resource's manager user will be cleared.

false

PurgeFutureResourceHistoryFlag

Boolean

No

false

This flag is meaningful only when the resource cannot be deleted. If set to 'true', this will cause future history to be purged as well as setting the resource inactive as of the day after the updating the current history record or inserting a new history record as of a specified date. If not set, the request will fail in the presence of existing resource history records after the specified date (with the exception of a history record that only has the effect of terminate the resource at a later date, in which case, the date is moved up).

false

RdcExceptionClearFlag

Boolean

No

false

If set to 'true' any resource direct cost exceptions associated with this resource will be removed.

false

RequestedTimeOffApprovalUserIdentityClearFlagRequestedTimeOffApprovalUserClearFlag

Boolean

No

false

The identity of this If set to 'true', the resource's time off approverapproval user will be cleared.

false

ResetCalendarAuthenticationTokenFlag

Boolean

No

false

If set to 'true', this resource's calendar authentication token for the Outlook Calendar integration will be cleared.

false

Resource

PwsResourceDetail

Yes


This structure contains the complete set of information about a resource.


ResourceTimestamp

String

No


This is a Base64 encoded timestamp optionally utilized for resource locking.


SkillApprovalUserIdentityClearFlagSkillApprovalUserClearFlag

Boolean

No

false

The user identity of this If set to 'true', the resource's skill approverapproval user will be cleared.

false

SubcontractorInvoiceVendorIdentityClearFlag

Boolean

No

false

If set to 'true', this resource's subcontractor invoice vendor identity will be set to nullcleared.

false

TimeAndCostGlccOverrideClearFlag

Boolean

No

false

If set to 'true', any overrides to this resource's time and cost general ledger cost center will be reset to the default.

false

TimeEntryDelegateUserIdentityClearFlagTimeEntryDelegateUserClearFlag

Boolean

No

false

The identity of this If set to 'true', the resource's delegated user for time entry delegate user will be cleared.

false

TimecardApprovalUserIdentityClearFlagTimecardApprovalUserClearFlag

Boolean

No

false

The identity of this If set to 'true', the resource's time card approverapproval user will be cleared.

false

WorkingScheduleOverrideClearFlag

Boolean

No

false

If set to 'true', any overrides to this resource's working schedule will be reset to the default (determined by the resource's locationworking schedule will be reset to the default (determined by the resource's location).

false
SetNullValuesFromResourceTypeFlagBooleanNofalseApplies to only updating resource, always inherit the defaults from ResourceType on insert and will continue to do so even if this flag is set to false. ; If set to 'true' and resource type parameters are not specified, this web service will reset the parameters using resource type default values.false


Request Usage Example(s)


Code Block
languagexml
titleExample 01
collapsetrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveResource>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AeKkhtiAVtOJRHdW+Dy08Q==</req:SessionTicket>
            <req:AllowDuplicateInitialsFlag>true</req:AllowDuplicateInitialsFlag>
            <req:ExpenseApprovalUserClearFlag>false</req:ExpenseApprovalUserClearFlag>
            <req:ExpenseEntryDelegateUserClearFlag>false</req:ExpenseEntryDelegateUserClearFlag>
            <req:ExpenseReportVendorClearFlag>false</req:ExpenseReportVendorClearFlag>
            <req:FullDetailFlag>true</req:FullDetailFlag>
            <req:ManagerUserClearFlag>false</req:ManagerUserClearFlag>
            <req:PurgeFutureResourceHistoryFlag>false</req:PurgeFutureResourceHistoryFlag>
            <req:RdcExceptionClearFlag>false</req:RdcExceptionClearFlag>
            <req:RequestedTimeOffApprovalUserClearFlag>false</req:RequestedTimeOffApprovalUserClearFlag>
            <req:ResetCalendarAuthenticationTokenFlag>false</req:ResetCalendarAuthenticationTokenFlag>
            <req:Resource>
               <com:ResourceDisplayName>Michael Smith</com:ResourceDisplayName>
               <com:ResourceReferenceSystemId>WS-1101A</com:ResourceReferenceSystemId>
               <com:EmailAddress>msmith@revcorp.bb</com:EmailAddress>
               <com:FirstName>Michael</com:FirstName>
               <com:LastName>Smith</com:LastName>
               <com:ExpenseApprovalUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:ExpenseApprovalUserIdentity>
               <com:ExpenseEntryDelegateUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:ExpenseEntryDelegateUserIdentity>
               <com:Initials>MS</com:Initials>
               <com:LatestHistoryRecord>
                  <com:ActualHolidaysFlag>true</com:ActualHolidaysFlag>
                  <com:AllowApproveOwnTimecardsFlag>true</com:AllowApproveOwnTimecardsFlag>
                  <com:BillableFlag>true</com:BillableFlag>
                  <com:CostCenterIdentity>
                     <com:CostCenterName>IT Team (USA)</com:CostCenterName>
                     <com:CostCenterNumber>IT Team (USA)</com:CostCenterNumber>
                  </com:CostCenterIdentity>
                  <com:ExpenseReportVendorIdentity>
                     <com:VendorName>Credit Card</com:VendorName>
                     <com:VendorNumber>Credit Card</com:VendorNumber>
                  </com:ExpenseReportVendorIdentity>
                  <com:InactiveFlag>false</com:InactiveFlag>
                  <com:LocationIdentity>
                     <com:LocationName>USA</com:LocationName>
                  </com:LocationIdentity>
                  <com:MissingTimeEmailFlag>true</com:MissingTimeEmailFlag>
                  <com:PayCategory>S</com:PayCategory>
                  <com:ResourceTypeIdentity>
                     <com:ResourceTypeCode>FTE</com:ResourceTypeCode>
                     <com:ResourceTypeName>Full Time Employee</com:ResourceTypeName>
                  </com:ResourceTypeIdentity>
                  <com:ScheduledHolidaysFlag>true</com:ScheduledHolidaysFlag>
                  <com:TemporaryWorkerFlag>false</com:TemporaryWorkerFlag>
                  <com:TitleIdentity>
                     <com:DepartmentIdentity>
                        <com:DepartmentName>IT Team</com:DepartmentName>
                     </com:DepartmentIdentity>
                     <com:TitleName>Level 1</com:TitleName>
                  </com:TitleIdentity>
                  <com:TrackMissingTimeFlag>true</com:TrackMissingTimeFlag>
                  <com:WorkingScheduleOverrides>
                     <com:PwsResourceWorkingScheduleDay>
                        <com:DayOfWeek>Monday</com:DayOfWeek>
                        <com:StartTimeMinutesSinceMidnight>480</com:StartTimeMinutesSinceMidnight>
                        <com:WorkingMinutes>480</com:WorkingMinutes>
                     </com:PwsResourceWorkingScheduleDay>
                     <com:PwsResourceWorkingScheduleDay>
                        <com:DayOfWeek>Tuesday</com:DayOfWeek>
                        <com:StartTimeMinutesSinceMidnight>480</com:StartTimeMinutesSinceMidnight>
                        <com:WorkingMinutes>480</com:WorkingMinutes>
                     </com:PwsResourceWorkingScheduleDay>
                     <com:PwsResourceWorkingScheduleDay>
                        <com:DayOfWeek>Wednesday</com:DayOfWeek>
                        <com:StartTimeMinutesSinceMidnight>480</com:StartTimeMinutesSinceMidnight>
                        <com:WorkingMinutes>480</com:WorkingMinutes>
                     </com:PwsResourceWorkingScheduleDay>
                     <com:PwsResourceWorkingScheduleDay>
                        <com:DayOfWeek>Thursday</com:DayOfWeek>
                        <com:StartTimeMinutesSinceMidnight>480</com:StartTimeMinutesSinceMidnight>
                        <com:WorkingMinutes>480</com:WorkingMinutes>
                     </com:PwsResourceWorkingScheduleDay>
                     <com:PwsResourceWorkingScheduleDay>
                        <com:DayOfWeek>Friday</com:DayOfWeek>
                        <com:StartTimeMinutesSinceMidnight>480</com:StartTimeMinutesSinceMidnight>
                        <com:WorkingMinutes>480</com:WorkingMinutes>
                     </com:PwsResourceWorkingScheduleDay>
                  </com:WorkingScheduleOverrides>
               </com:LatestHistoryRecord>
               <com:LatestHistoryRecordBeginDate>2018-10-26T00:00:00.000Z</com:LatestHistoryRecordBeginDate>
               <com:ManagerUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:ManagerUserIdentity>
               <com:RequestedTimeOffApprovalUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:RequestedTimeOffApprovalUserIdentity>
               <com:SkillApprovalUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:SkillApprovalUserIdentity>
               <com:TimeEntryDelegateUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:TimeEntryDelegateUserIdentity>
               <com:TimecardApprovalFlag>true</com:TimecardApprovalFlag>
               <com:TimecardApprovalUserIdentity>
                  <com:UserReferenceSystemId>WS01</com:UserReferenceSystemId>
               </com:TimecardApprovalUserIdentity>
               <com:UserDefinedFields>
                  <com:PwsUserDefinedFieldDetail>
                     <com:UdfName>RS-Date</com:UdfName>
                     <com:DataType>D</com:DataType>
                     <com:DateValue>2018-10-26T00:00:00.000Z</com:DateValue>
                  </com:PwsUserDefinedFieldDetail>
                  <com:PwsUserDefinedFieldDetail>
                     <com:UdfName>RS-Text</com:UdfName>
                     <com:DataType>T</com:DataType>
                     <com:TextValue>New Resource</com:TextValue>
                  </com:PwsUserDefinedFieldDetail>
               </com:UserDefinedFields>
               <com:UserIdentity>
                  <com:UserDisplayName>Michael Smith</com:UserDisplayName>
                  <com:UserReferenceSystemId>WS-1101A</com:UserReferenceSystemId>
               </com:UserIdentity>
               <com:VendorReferenceSystemId>WS-1101A</com:VendorReferenceSystemId>
            </req:Resource>
            <req:SkillApprovalUserClearFlag>false</req:SkillApprovalUserClearFlag>
            <req:SubcontractorInvoiceVendorClearFlag>false</req:SubcontractorInvoiceVendorClearFlag>
            <req:TimeAndCostGlccOverrideClearFlag>false</req:TimeAndCostGlccOverrideClearFlag>
            <req:TimeEntryDelegateUserClearFlag>false</req:TimeEntryDelegateUserClearFlag>
            <req:TimecardApprovalUserClearFlag>false</req:TimecardApprovalUserClearFlag>
            <req:WorkingScheduleOverrideClearFlag>false</req:WorkingScheduleOverrideClearFlag>
         </pws:serviceRequest>
      </pws:PwsSaveResource>
   </soapenv:Body>
</soapenv:Envelope>

...

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.

Ok

ServerTimestampUtc

DateTime

Click here for more information.

2018-11-01T21:29:48.4465623Z

Resource

PwsResourceElement

This structure contains a resource detail structure (PwsResourceDetail). It is also where additional related information about the resource, that is not directly an attribute of the resource itself would be found. As of this time, there is no additional information returned about resourcesThis will be specified only when FullDetailFlag is set to 'true'.


ResourceIdentity

PwsResourceRef

This structure represents the unique key fields associated with identifying a resource.


Timestamp

String

This is a Base64 encoded timestamp optionally utilized for resource locking.

AAAAABCpAFc=

...

ErrorNumber

ErrorCode

ErrorText

10104InternalErrorError 57266, State 1: User already linked to another resource (installation = 2378, link user = 291152)
10116InvalidDateValueSpecifiedThe date specified in the field "LatestHistoryRecordBeginDate" in the class "PwsResourceDetail" is invalid or out of range. The time component of the specified date must be midnight UTC.
50021RefStructureMismatchError 50021, State 3: Mismatched ref structure ### [refStructureName:PwsUserRef]
50022EntityRequired

Error 50022, State 1: Entity is required ### [refStructureName:PwsCostCenterRef]

Error 50022, State 1: Entity is required ### [context:][entityName:Title][refStructureName:PwsTitleRef]

50024EntityNotFound
Entity PwsCostCenterRef Resource User: User was not found. Another user may have deleted it.
50065MissingRequiredFieldError 50065, State 2: Missing required field ### [missingFieldName:InactiveFlag]
50225CannotUpdatePropertyDisplay Name cannot be updated.