PwsSaveProjectEstimate

Overview

Save changes to a project estimate or create a new project estimate.

Estimates must have at least one line item, and as of now, may only have a single line item. Estimates that are managed by a CRM integration may not be modified by this service. Caller must have permission to update the project in order to add or update estimates.

Request Format


PwsSaveProjectEstimate Request

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.

AaonOqOoU2Gb8IbysO8KXQ==

FullDetailFlag

Boolean

No

false

If set to true, include full detailed project estimate element PwsProjectEstimateElement in response.

true

LocksToSteal

PwsEntityLockSummary[]

No


The detailed information of the locks that are to be stolen. If not specified, the request will fail if any requested locks are already held. If specified, the information supplied must exactly match the current state of existing locks or the attempt to steal the existing locks will fail. Typically, this service is invoked with LocksToSteal empty or null. If there are existing locks, they will be returned in the LockHolders member of PwsFault. This data can then be sent, as is, back to the server in a second invocation of this service, as LocksToSteal, if the caller desires to steal the locks.


ProjectEstimate

PwsProjectEstimateDetail

Yes


This structure contains the complete set of information about a project estimate.


ProjectTimestamp

String

No


This is an optimistic locking timestamp that, if provided on update request, will cause the request to fail if the timestamp stored in the database does not match the provided value.


ProjectorLockSetId

Int32

No


If stealing existing locks, specify lock holders from PwsFault response.


SetActiveEstimateFlag

Boolean

No

false

If set to true the estimate will be set to the active estimate for the project. A project may only have one active estimate, so this may result in removing this designation from another estimate. If a project has any estimates at all, one must be designated active. Therefore, if saving the first estimate on a project, it will become the active estimate, regardless of this setting.

true


Request Usage Example(s)


Request Example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:sch="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveProjectEstimate>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AaonOqOoU2Gb8IbysO8KXQ==</req:SessionTicket>
            <sch:FullDetailFlag>true</sch:FullDetailFlag>
            <sch:ProjectEstimate>
               <com:ProjectEstimateName>Web Service Estimate</com:ProjectEstimateName>
               <com:ProjectIdentity>
                  <com:ProjectUid>1152921504607496128</com:ProjectUid>
               </com:ProjectIdentity>
               <com:EndDate>2022-12-31T00:00:00.000Z</com:EndDate>
               <com:EstimateBasis>W</com:EstimateBasis>
               <com:StartDate>2022-01-01T00:00:00.000Z</com:StartDate>
               <com:LineItems>
                  <com:PwsProjectEstimateLineItem>
                     <com:EstimatedMinutes>300</com:EstimatedMinutes>
                     <com:EstimatedRevenue>150000.00</com:EstimatedRevenue>
                     <com:Ftes>50</com:Ftes>
                     <com:TitleIdentity>
                        <com:DepartmentIdentity>
                           <com:DepartmentName>Billing Titles</com:DepartmentName>
                        </com:DepartmentIdentity>
                        <com:TitleName>Application Architect</com:TitleName>
                     </com:TitleIdentity>
                  </com:PwsProjectEstimateLineItem>
               </com:LineItems>
            </sch:ProjectEstimate>
            <sch:SetActiveEstimateFlag>true</sch:SetActiveEstimateFlag>
         </pws:serviceRequest>
      </pws:PwsSaveProjectEstimate>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsSaveProjectEstimate 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.

Ok
ServerTimestampUtc

DateTime

Click here for more information.

2022-07-25T20:17:05.545186Z

ProjectEstimate

PwsProjectEstimateElement

This structure contains a project estimate detail structure (PwsProjectEstimateDetail). It is also where additional related information about the project estimate, that is not directly an attribute of the project estimate itself would be found. This will only be populated if FullDetailFlag was specified on input.


ProjectEstimateIdentity

PwsProjectEstimateRef

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


ProjectTimestamp

String

This is an optimistic locking timestamp that, if provided on update request, will cause the request to fail when the timestamp stored in the database does not match the provided value. This will reflect that the estimate was updated as part of this request (it should differ from the timestamp provided on input (if any), or from the timestamp returned by a prior web service request.

AAAAABxnQ9o=

StolenLocks

PwsEntityLockSummary

This structure contains information about the locks that were stolen in order to complete this request, Will be included only when LocksToSteal is specified in the request.


Response Usage Example(s)


Response Example
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveProjectEstimateResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveProjectEstimateResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsMessage>
                  <b:AdditionalErrorText>Message 136: This request was executed against the Development [appdev.projectorpsa.com] environment.</b:AdditionalErrorText>
                  <b:ErrorCode>NonProductionEnvironment</b:ErrorCode>
                  <b:ErrorNumber>136</b:ErrorNumber>
                  <b:ErrorText>This web service request was executed against a non-production instance of Projector.</b:ErrorText>
                  <b:Type>Information</b:Type>
                  <b:ReferenceId1 i:nil="true"/>
                  <b:ReferenceId2 i:nil="true"/>
               </b:PwsMessage>
            </Messages>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2022-07-25T20:17:05.545186Z</ServerTimestampUtc>
            <a:ProjectEstimate xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:ActiveEstimateFlag>true</b:ActiveEstimateFlag>
               <b:CanUpdateProjectFlag>true</b:CanUpdateProjectFlag>
               <b:CreatedByUser>
                  <b:UserDisplayName>Bettina</b:UserDisplayName>
                  <b:UserId>355639</b:UserId>
                  <b:UserReferenceSystemId>Bettina</b:UserReferenceSystemId>
                  <b:UserUid>1152921504607090472</b:UserUid>
                  <b:EmailAddress>bettina@revcorp.bb</b:EmailAddress>
                  <b:FirstName>Bettina</b:FirstName>
                  <b:LastName>Borgys</b:LastName>
                  <b:MiddleName i:nil="true"/>
               </b:CreatedByUser>
               <b:CreatedTimestamp>2022-07-25T20:17:05.593Z</b:CreatedTimestamp>
               <b:CrmIntegrationFlag>false</b:CrmIntegrationFlag>
               <b:LastModifiedByUser>
                  <b:UserDisplayName>Bettina</b:UserDisplayName>
                  <b:UserId>355639</b:UserId>
                  <b:UserReferenceSystemId>Bettina</b:UserReferenceSystemId>
                  <b:UserUid>1152921504607090472</b:UserUid>
                  <b:EmailAddress>abettina@revcorp.bb</b:EmailAddress>
                  <b:FirstName>Bettina/b:FirstName>
                  <b:LastName>Borgys</b:LastName>
                  <b:MiddleName i:nil="true"/>
               </b:LastModifiedByUser>
               <b:LastModifiedTimestamp>2022-07-25T20:17:05.593Z</b:LastModifiedTimestamp>
               <b:ProjectEstimateDetail>
                  <b:ProjectEstimateId>15348</b:ProjectEstimateId>
                  <b:ProjectEstimateName>Web Service Estimate</b:ProjectEstimateName>
                  <b:ProjectEstimateUid>1152921504606862324</b:ProjectEstimateUid>
                  <b:ProjectIdentity>
                     <b:ProjectCode>Leidos MoD OTM Proof of</b:ProjectCode>
                     <b:ProjectId>649041</b:ProjectId>
                     <b:ProjectUid>1152921504607496017</b:ProjectUid>
                  </b:ProjectIdentity>
                  <b:EndDate>2022-12-31T00:00:00Z</b:EndDate>
                  <b:EstimateBasis>W</b:EstimateBasis>
                  <b:StartDate>2022-01-01T00:00:00Z</b:StartDate>
                  <b:LineItems/>
               </b:ProjectEstimateDetail>
               <b:ProjectTimestamp>AAAAABxnQ9o=</b:ProjectTimestamp>
            </a:ProjectEstimate>
            <a:ProjectEstimateIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:ProjectEstimateId i:nil="true"/>
               <b:ProjectEstimateName>Web Service Estimate</b:ProjectEstimateName>
               <b:ProjectEstimateUid>1152921504606862324</b:ProjectEstimateUid>
               <b:ProjectIdentity>
                  <b:ProjectCode>Model 5</b:ProjectCode>
                  <b:ProjectId i:nil="true"/>
                  <b:ProjectUid>1152921504607496128</b:ProjectUid>
               </b:ProjectIdentity>
            </a:ProjectEstimateIdentity>
            <a:ProjectTimestamp>AAAAABxnQ9o=</a:ProjectTimestamp>
            <a:StolenLocks i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
         </PwsSaveProjectEstimateResult>
      </PwsSaveProjectEstimateResponse>
   </s:Body>
</s:Envelope>

PwsSaveProjectEstimate - Common Errors and Warnings