SWAPI – Job Summary

SWAPI – Job Summary. 1

Background. 1

ReportingJobClassQuery. 1

ReportingSalesSourceQuery. 2

JobSummaryQuery. 3

JobSummaryByIDQuery. 4

JobSummaryUpdate. 6

JobSummaryByIDUpdate. 7

 

Background

Seven new database fields were created to capture job value data on the SuccessWare Job Summary form. The data in these fields needs to be returned via the SWAPI Job Summary queries. The Job Summary Update commands should also accept these fields as parameters.

1.       InvoiceTotal – the total dollar amount billed on the invoice

2.       AgreementVisitValue – the value of any agreement visits performed but not billed

3.       ServiceChargedToAgreement – the value of any work charged to an agreement

4.       ServiceChargedToWarranty – the value of any work charged to a warranty

5.       AgreementsSoldValue – the value of any new agreement or renewal billed on the invoice

6.       ReportingJobClass – A lookup value indicating the type of job class, for reporting purposes only

7.       ReportingSaleSource – A lookup value indicating the sales source, for reporting purposes only

 

The seven fields above expand upon the original field TotalTicket. To maintain backwards compatibility SWAPI will still return and accept the TotalTicket parameter. However, if values are provided for any of these 7 new fields and for TotalTicket then SWAPI will return an error as you can only supply one or the other.

 

If ANY of these 5 fields are submitted with a value, then it will be assumed that if any of the others were not submitted or if they were submitted as blank, that their value will be 0.

1.       InvoiceTotal

2.       AgreementVisitValue

3.       ServiceChargedToAgreement

4.       ServiceChargedToWarranty

5.       AgreementsSoldValue

 

ReportingJobClassQuery

Return all reference library values for Reporting Job Class

<SessionRequest Version="string" SessionID="{9EFADFB5-58C4-4BE1-BBDB-9A95FE607AE9}" RequestID="string">

  <ReportingJobClassQuery Filter="string" Max="string" OrderBy="string" StyleNo="string" StyleOptions="string"/>

</SessionRequest>

 

<ReportingJobClassQueryResponse Successful="true" ResultCode="000" ResultText="Successful" Version="1.9.200.2" RequestID="string">

  <ReportingJobClassQueryData ReturnedRows="9" FilteredRows="9" TotalRows="9">

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>DemCalOHAC</ReportingJobClass>

      <ReportingJobClassDesc>Demand Calls (OHAC)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>SchSrvCalOHAC</ReportingJobClass>

      <ReportingJobClassDesc>Scheduled Service Calls (OHAC)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>ClbVisOHAC</ReportingJobClass>

      <ReportingJobClassDesc>Club Visits (OHAC)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>RepSrvMS</ReportingJobClass>

      <ReportingJobClassDesc>Repair - Service (MS)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>RepInsSrvMS</ReportingJobClass>

      <ReportingJobClassDesc>Repair - Installed Service (MS)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>PCAIspMS</ReportingJobClass>

      <ReportingJobClassDesc>PCA Inspections (MS)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>PlbSerBF</ReportingJobClass>

      <ReportingJobClassDesc>Plumbing Service (BF)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>DrnSwrSrvBF</ReportingJobClass>

      <ReportingJobClassDesc>Drain/Sewer Service (BF)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

    <ReportingJobClassQueryRecord>

      <ReportingJobClass>BSAIspBF</ReportingJobClass>

      <ReportingJobClassDesc>BSA Inspections (BF)</ReportingJobClassDesc>

    </ReportingJobClassQueryRecord>

  </ReportingJobClassQueryData>

</ReportingJobClassQueryResponse>

ReportingSalesSourceQuery

Return all reference library values for Reporting Sales Source

<SessionRequest Version="string" SessionID="{9EFADFB5-58C4-4BE1-BBDB-9A95FE607AE9}" RequestID="string">

  <ReportingSalesSourceQuery Filter="string" Max="string" OrderBy="string" StyleNo="string" StyleOptions="string"/>

</SessionRequest>

 

<ReportingSalesSourceQueryResponse Successful="true" ResultCode="000" ResultText="Successful" Version="1.9.200.2" RequestID="string">

  <ReportingSalesSourceQueryData ReturnedRows="11" FilteredRows="11" TotalRows="11">

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>MarkLeadsOHAC</ReportingSaleSource>

      <ReportingSaleSourceDesc>Marketed Leads (OHAC)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>RepOppsOHAC</ReportingSaleSource>

      <ReportingSaleSourceDesc>Repair Opportunities (OHAC)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>SchSerOppsOHAC</ReportingSaleSource>

      <ReportingSaleSourceDesc>Scheduled Service Opportunities (OHAC)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>IAQOppsOHAC</ReportingSaleSource>

      <ReportingSaleSourceDesc>IAQ Call Opportunities (OHAC)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>OthCallOppsOHAC</ReportingSaleSource>

      <ReportingSaleSourceDesc>Other Call Opportunities (OHAC)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>SerChgOppsMS</ReportingSaleSource>

      <ReportingSaleSourceDesc>Service Change Opportunities (MS)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>PnlChgOppsMS</ReportingSaleSource>

      <ReportingSaleSourceDesc>Panel Change Opportunities (MS)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>SrgArstOppsMS</ReportingSaleSource>

      <ReportingSaleSourceDesc>Surge Arrestor Opportunities (MS)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>WtrHtrOppsBF</ReportingSaleSource>

      <ReportingSaleSourceDesc>Water Heater Opportunities (BF)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>SwrReOppsBF</ReportingSaleSource>

      <ReportingSaleSourceDesc>Sewer/Repipe Opportunities (BF)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

    <ReportingSalesSourceQueryRecord>

      <ReportingSaleSource>BoilOthOppsBF</ReportingSaleSource>

      <ReportingSaleSourceDesc>Boiler/Other Opportunities (BF)</ReportingSaleSourceDesc>

    </ReportingSalesSourceQueryRecord>

  </ReportingSalesSourceQueryData>

</ReportingSalesSourceQueryResponse>

JobSummaryQuery

Return the 7 new fields that were created for the new Job Summary form. We will also return the Actual Visit Value so that it can be overridden if necessary.

<SessionRequest Version="string" SessionID="{9EFADFB5-58C4-4BE1-BBDB-9A95FE607AE9}" RequestID="string">

  <JobSummaryQuery Filter="string" Max="string" OrderBy="string" StyleNo="string" StyleOptions="string">

    <JobNo>string</JobNo>

  </JobSummaryQuery>

</SessionRequest>

 

<JobSummaryQueryResponse Successful="true" ResultCode="000" ResultText="Successful" Version="1.9.200.2" RequestID="string">

  <JobSummaryQueryData ReturnedRows="1" FilteredRows="1" TotalRows="1" QueryOptions="JobNo=646859">

    <JobSummaryQueryRecord>

      <JobID>646859</JobID>

      <JobNo>646859</JobNo>

      <AgreementSold>FALSE</AgreementSold>

      <AgrmntSoldType/>

      <AgrmntSoldYears/>

      <AgrmntSoldAmount/>

      <AgrmntSoldFullPay>FALSE</AgrmntSoldFullPay>

      <AgrmntSoldPartialPay>FALSE</AgrmntSoldPartialPay>

      <ExWarrantySold>FALSE</ExWarrantySold>

      <ExWarrYears/>

      <ExWarrAmount/>

      <LeadGenBy/>

      <LeadGenerated>FALSE</LeadGenerated>

      <IsCallback>FALSE</IsCallback>

      <CallbackJobNo/>

      <CallbackJobID/>

      <WarrantyCall>FALSE</WarrantyCall>

      <ContractMaintenance>FALSE</ContractMaintenance>

      <NonContractMaintenance>FALSE</NonContractMaintenance>

      <TotalTicket>149</TotalTicket>

      <AmountCollected/>

      <ExtraProductAmount/>

      <IsNoCharge>TRUE</IsNoCharge>

      <BillableHours/>

      <MoneyCount/>

      <AddOnCount/>

      <RanDiagnostic>FALSE</RanDiagnostic>

      <AgrOpportunity>FALSE</AgrOpportunity>

      <WarrOpportunity>FALSE</WarrOpportunity>

      <ReplOpportunity>FALSE</ReplOpportunity>

      <ReplSold>FALSE</ReplSold>

      <ReplAmountSold>0</ReplAmountSold>

      <OppGenerated>FALSE</OppGenerated>

      <OpportunityCode/>

      <FollowupDate/>

      <InvoiceID>811188</InvoiceID>

      <WorkDone/>

      <FollowUpNote/>

      <IsNotified>FALSE</IsNotified>

      <IsDone>FALSE</IsDone>

      <InvoiceTotal/>

      <AgreementVisitValue>149</AgreementVisitValue>

      <ServiceChargedToAgreement/>

      <ServiceChargedToWarranty/>

      <AgreementsSoldValue/>

      <ReportingJobClass>DemCalOHAC</ReportingJobClass>

      <ReportingSaleSource>MarkLeadsOHAC</ReportingSaleSource>

      <ActualVisitValue>149</ActualVisitValue>

    </JobSummaryQueryRecord>

  </JobSummaryQueryData>

</JobSummaryQueryResponse>

JobSummaryByIDQuery

Return the 7 new fields that were created for the new Job Summary form. We will also return the Actual Visit Value so that it can be overridden if necessary.

<SessionRequest Version="string" SessionID="{9EFADFB5-58C4-4BE1-BBDB-9A95FE607AE9}" RequestID="string">

  <JobSummaryByIDQuery Filter="string" Max="string" OrderBy="string" StyleNo="string" StyleOptions="string">

    <JobID>int</JobID>

  </JobSummaryByIDQuery>

</SessionRequest>

 

<JobSummaryByIDQueryResponse Successful="true" ResultCode="000" ResultText="Successful" Version="1.9.200.2" RequestID="string">

  <JobSummaryByIDQueryData ReturnedRows="1" FilteredRows="1" TotalRows="1" QueryOptions="JobID=646859">

    <JobSummaryByIDQueryRecord>

      <JobID>646859</JobID>

      <JobNo>646859</JobNo>

      <AgreementSold>FALSE</AgreementSold>

      <AgrmntSoldType/>

      <AgrmntSoldYears/>

      <AgrmntSoldAmount/>

      <AgrmntSoldFullPay>FALSE</AgrmntSoldFullPay>

      <AgrmntSoldPartialPay>FALSE</AgrmntSoldPartialPay>

      <ExWarrantySold>FALSE</ExWarrantySold>

      <ExWarrYears/>

      <ExWarrAmount/>

      <LeadGenBy/>

      <LeadGenerated>FALSE</LeadGenerated>

      <IsCallback>FALSE</IsCallback>

      <CallbackJobNo/>

      <CallbackJobID/>

      <WarrantyCall>FALSE</WarrantyCall>

      <ContractMaintenance>FALSE</ContractMaintenance>

      <NonContractMaintenance>FALSE</NonContractMaintenance>

      <TotalTicket>149</TotalTicket>

      <AmountCollected/>

      <ExtraProductAmount/>

      <IsNoCharge>TRUE</IsNoCharge>

      <BillableHours/>

      <MoneyCount/>

      <AddOnCount/>

      <RanDiagnostic>FALSE</RanDiagnostic>

      <AgrOpportunity>FALSE</AgrOpportunity>

      <WarrOpportunity>FALSE</WarrOpportunity>

      <ReplOpportunity>FALSE</ReplOpportunity>

      <ReplSold>FALSE</ReplSold>

      <ReplAmountSold>0</ReplAmountSold>

      <OppGenerated>FALSE</OppGenerated>

      <OpportunityCode/>

      <FollowupDate/>

      <InvoiceID>811188</InvoiceID>

      <WorkDone/>

      <FollowUpNote/>

      <IsNotified>FALSE</IsNotified>

      <IsDone>FALSE</IsDone>

      <InvoiceTotal/>

      <AgreementVisitValue>149</AgreementVisitValue>

      <ServiceChargedToAgreement/>

      <ServiceChargedToWarranty/>

      <AgreementsSoldValue/>

      <ReportingJobClass>DemCalOHAC</ReportingJobClass>

      <ReportingSaleSource>MarkLeadsOHAC</ReportingSaleSource>

      <ActualVisitValue>149</ActualVisitValue>

    </JobSummaryByIDQueryRecord>

  </JobSummaryByIDQueryData>

</JobSummaryByIDQueryResponse>

JobSummaryUpdate

Accept the 7 additional fields as parameters. If any of the 5 parameters involved in this calculation are provided, then SWAPI will calculate and return the TotalTicket value as follows:

     InvoiceTotal

 +  AgreementVisitValue

 +  ServiceChargedToAgreement

 +  ServiceChargedToWarranty

 -  AgreementsSoldValue

 

<SessionRequest Version="string" SessionID="{9EFADFB5-58C4-4BE1-BBDB-9A95FE607AE9}" RequestID="string">

  <JobSummaryUpdate>

    <JobSummaryUpdateData>

      <JobSummaryUpdateRecord>

        <JobID>integer</JobID>

        <JobNo>string(10)</JobNo>

        <AgreementSold>boolean</AgreementSold>

        <AgrmntSoldType>string(15)</AgrmntSoldType>

        <AgrmntSoldYears>short</AgrmntSoldYears>

        <AgrmntSoldAmount>float</AgrmntSoldAmount>

        <AgrmntSoldFullPay>boolean</AgrmntSoldFullPay>

        <AgrmntSoldPartialPay>boolean</AgrmntSoldPartialPay>

        <ExWarrantySold>boolean</ExWarrantySold>

        <ExWarrYears>short</ExWarrYears>

        <ExWarrAmount>float</ExWarrAmount>

        <LeadGenBy>string(6)</LeadGenBy>

        <LeadGenerated>boolean</LeadGenerated>

        <IsCallback>boolean</IsCallback>

        <CallbackJobNo>string(10)</CallbackJobNo>

        <CallbackJobID>integer</CallbackJobID>

        <WarrantyCall>boolean</WarrantyCall>

        <ContractMaintenance>boolean</ContractMaintenance>

        <NonContractMaintenance>boolean</NonContractMaintenance>

        <TotalTicket>float</TotalTicket>

        <AmountCollected>float</AmountCollected>

        <ExtraProductAmount>float</ExtraProductAmount>

        <IsNoCharge>boolean</IsNoCharge>

        <BillableHours>float</BillableHours>

        <MoneyCount>integer</MoneyCount>

        <AddOnCount>integer</AddOnCount>

        <RanDiagnostic>boolean</RanDiagnostic>

        <AgrOpportunity>boolean</AgrOpportunity>

        <WarrOpportunity>boolean</WarrOpportunity>

        <ReplOpportunity>boolean</ReplOpportunity>

        <ReplSold>boolean</ReplSold>

        <ReplAmountSold>float</ReplAmountSold>

        <OppGenerated>boolean</OppGenerated>

        <OpportunityCode>string(10)</OpportunityCode>

        <FollowupDate>dateTime</FollowupDate>

        <InvoiceID>integer</InvoiceID>

        <WorkDone>string</WorkDone>

        <FollowUpNote>string</FollowUpNote>

        <IsNotified>boolean</IsNotified>

        <IsDone>boolean</IsDone>

        <InvoiceTotal>float</InvoiceTotal>

        <AgreementVisitValue>float</AgreementVisitValue>

        <ServiceChargedToAgreement>float</ServiceChargedToAgreement>

        <ServiceChargedToWarranty>float</ServiceChargedToWarranty>

        <AgreementsSoldValue>float</AgreementsSoldValue>

        <ReportingJobClass>string(15)</ReportingJobClass>

        <ReportingSaleSource>string(15)</ReportingSaleSource>

        <ActualVisitValue>float</ActualVisitValue>

      </JobSummaryUpdateRecord>

    </JobSummaryUpdateData>

  </JobSummaryUpdate>

</SessionRequest>

JobSummaryByIDUpdate

Accept the 7 additional fields as parameters. If any of the 5 parameters involved in this calculation are provided, then SWAPI will calculate and return the TotalTicket value as follows:

     InvoiceTotal

 +  AgreementVisitValue

 +  ServiceChargedToAgreement

+  ServiceChargedToWarranty

 -  AgreementsSoldValue

 

<SessionRequest Version="string" SessionID="{9EFADFB5-58C4-4BE1-BBDB-9A95FE607AE9}" RequestID="string">

  <JobSummaryByIDUpdate>

    <JobSummaryByIDUpdateData>

      <JobSummaryByIDUpdateRecord>

        <JobID>integer</JobID>

        <JobNo>string(10)</JobNo>

        <AgreementSold>boolean</AgreementSold>

        <AgrmntSoldType>string(15)</AgrmntSoldType>

        <AgrmntSoldYears>short</AgrmntSoldYears>

        <AgrmntSoldAmount>float</AgrmntSoldAmount>

        <AgrmntSoldFullPay>boolean</AgrmntSoldFullPay>

        <AgrmntSoldPartialPay>boolean</AgrmntSoldPartialPay>

        <ExWarrantySold>boolean</ExWarrantySold>

        <ExWarrYears>short</ExWarrYears>

        <ExWarrAmount>float</ExWarrAmount>

        <LeadGenBy>string(6)</LeadGenBy>

        <LeadGenerated>boolean</LeadGenerated>

        <IsCallback>boolean</IsCallback>

        <CallbackJobNo>string(10)</CallbackJobNo>

        <CallbackJobID>integer</CallbackJobID>

        <WarrantyCall>boolean</WarrantyCall>

        <ContractMaintenance>boolean</ContractMaintenance>

        <NonContractMaintenance>boolean</NonContractMaintenance>

        <TotalTicket>float</TotalTicket>

        <AmountCollected>float</AmountCollected>

        <ExtraProductAmount>float</ExtraProductAmount>

        <IsNoCharge>boolean</IsNoCharge>

        <BillableHours>float</BillableHours>

        <MoneyCount>integer</MoneyCount>

        <AddOnCount>integer</AddOnCount>

        <RanDiagnostic>boolean</RanDiagnostic>

        <AgrOpportunity>boolean</AgrOpportunity>

        <WarrOpportunity>boolean</WarrOpportunity>

        <ReplOpportunity>boolean</ReplOpportunity>

        <ReplSold>boolean</ReplSold>

        <ReplAmountSold>float</ReplAmountSold>

        <OppGenerated>boolean</OppGenerated>

        <OpportunityCode>string(10)</OpportunityCode>

        <FollowupDate>dateTime</FollowupDate>

        <InvoiceID>integer</InvoiceID>

        <WorkDone>string</WorkDone>

        <FollowUpNote>string</FollowUpNote>

        <IsNotified>boolean</IsNotified>

        <IsDone>boolean</IsDone>

        <InvoiceTotal>float</InvoiceTotal>

        <AgreementVisitValue>float</AgreementVisitValue>

        <ServiceChargedToAgreement>float</ServiceChargedToAgreement>

        <ServiceChargedToWarranty>float</ServiceChargedToWarranty>

        <AgreementsSoldValue>float</AgreementsSoldValue>

        <ReportingJobClass>string(15)</ReportingJobClass>

        <ReportingSaleSource>string(15)</ReportingSaleSource>

        <ActualVisitValue>float</ActualVisitValue>

      </JobSummaryByIDUpdateRecord>

    </JobSummaryByIDUpdateData>

  </JobSummaryByIDUpdate>

</SessionRequest>