com.genesyslab.wfm8.API.service.scheduleTrade800

## Interface WFMScheduleTradeService800Soap

-     public interface WFMScheduleTradeService800Soap

  It is a supervisor's responsibility to review pending trade requests and approve or decline them in a timely fashion. If a supervisor approves a pending trade, it does not necessarily mean that the trade will be approved. The auto-decline conditions are re-checked at that time, and if there were any changes made to the agent's profile, that would prevent the schedule trade. In that case, the trade would be auto-declined instead. The Auto-Approval process is run every time a trade record is submitted. That is, after a response is accepted by the proposing agent, or after a personal proposal is accepted by a responding agent (in the case of a one-way handshake). The auto-approval procedure applies the Trading Rules and decides whether the trade can be auto-approved, should be auto-declined, or if it requires manual review by a supervisor. Pending trades, proposals, and responses are automatically cancelled if the schedules related to the proposal or response are modified in the Master Schedule in any way. For instance, a manual modification by a supervisor, or another trade with overlapping schedule data having been approved and executed would cause this cancellation. Schedule Trade Service provides the API for querying trade proposals addressed to, or originating from a specified agent. It allows you to specify different filters and a sort order. Query result is a list of sorted Proposal records. Schedule Trade Service provides the API for querying trade responses addressed to, or originating from a specified agent. It allows you to specify different filters and a sort order. Query result is a list of sorted Response records. Schedule Trade Service provides the API for querying trades. It allows you to specify different filters and a sort order. Query result is a list of sorted Trade records. Returned trades are filtered according to the querying user's access rights: the user should have access to both the proposing and responding agents to see the trade.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SchTradeResponseStatus` | `acceptTradeProposal(int siteID, int agentID, int proposalID, java.lang.String comments)` Acceptance of the proposal creates a response record, which goes back to the proposing agent for a final handshake.
    `SchTradeProposalStatus` | `acceptTradeResponse(int siteID, int agentID, int proposalID, int responseID, java.lang.String comments)` A response to the proposal should be accepted by the proposing agent in order to schedule the trade to be submitted for approval.
    `void` | `acknowledgeNotification(int siteID, long timestamp)` Acknowledges to the server that the notification was received and processed.
    `SchTradeStatus` | `approveTrade(int siteID, int tradeID, java.lang.String comments)` A supervisor may approve a pending trade.
    `SchTradeProposalStatus` | `cancelTradeProposal(int siteID, int agentID, int proposalID, java.lang.String comments)` A proposal can be canceled by the proposing agent at any time while it is in an "Open" or "In Review" status.
    `SchTradeResponseStatus` | `cancelTradeResponse(int siteID, int agentID, int responseID, java.lang.String comments)` A response to a proposal can be canceled by the responding agent at any time while the proposal is in "Accept" or "In Review" status.
    `SchValidationHolder` | `checkTrade(int siteID, int tradeID)` Checks weather the trade would violate any "soft" or "hard" constraints.
    `SchTradeProposalStatus` | `declinePersonalTradeProposal(int siteID, int agentID, int proposalID, java.lang.String comments)` The responding agent may opt to decline a personal trade proposal.
    `SchTradeStatus` | `declineTrade(int siteID, int tradeID, java.lang.String comments)` A supervisor may decline the trade.
    `SchTradeResponseStatus` | `declineTradeResponse(int siteID, int agentID, int responseID, java.lang.String comments)` A proposing agent can opt to decline a response from the community to a community proposal, as well as the response from an agent responding to a personal proposal, if a two-way handshake was requested.
    `SchTradeHolder` | `fetchTradeFromSnapshot(java.lang.String snapshotID, int firstIndex, int lastIndex, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Retrieves a specified range of trades from the snapshot.
    `SchTradeProposalHolder` | `fetchTradeProposalFromSnapshot(java.lang.String snapshotID, int firstIndex, int lastIndex, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Retrieves a specified range of trade proposals from the snapshot.
    `SchTradeResponseHolder` | `fetchTradeResponseFromSnapshot(java.lang.String snapshotID, int firstIndex, int lastIndex, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Retrieves a specified range of trade responses from the snapshot.
    `SchTradeHolder` | `getTrade(int siteID, double startDate, double endDate, java.util.List<java.lang.Integer> teamIDArray, java.util.List<java.lang.Integer> agentIDArray, java.util.List<java.lang.Integer> statusFilter, int tradeSortMode, int agentSortMode, boolean sortAscending, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` List trades by applying specified filters and sort order.
    `SchTradeHolder` | `getTradeByID(int siteID, java.util.List<java.lang.Integer> tradeIDArray, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Loads the specific trade for the specified Trade ID.
    `SchCandidate` | `getTradeCandidates(int siteID, int agentID, java.util.List<java.lang.Double> days, java.util.List<java.lang.Integer> teamIDFilter)` Retrieves the list of agents for whom the agent trade is possible
    `SchTradeProposalHolder` | `getTradeProposal(int siteID, int agentID, int origin, double startDate, double endDate, java.util.List<java.lang.Integer> teamFilter, java.util.List<java.lang.Integer> typeFilter, java.util.List<java.lang.Integer> statusFilter, int proposalSortMode, int agentSortMode, boolean sortAscending, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` List the trade proposals for the specified agent by applying the specified filters and a sort order.
    `SchTradeProposalHolder` | `getTradeProposalByID(int siteID, java.util.List<java.lang.Integer> proposalIDArray, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Loads the specific trade proposal(s) for the specified Proposal ID.
    `SchTradeResponseHolder` | `getTradeResponse(int siteID, int agentID, int origin, double startDate, double endDate, java.util.List<java.lang.Integer> statusFilter, int responseSortMode, int agentSortMode, boolean sortAscending, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` List trade responses for the specified agent by applying the specified filters and sort order.
    `SchTradeResponseHolder` | `getTradeResponseByID(int siteID, java.util.List<java.lang.Integer> responseIDArray, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Loads specific trade response(s) for the specified Response ID.
    `SchTradeUnansweredHolder` | `getUnanswered(int siteID, int agentID, double startDate, double endDate)` Retrieves agent proposals with no responses
    `SchTradeProposalSnapshot` | `openTradeProposalSnapshot(int siteID, int agentID, int origin, double startDate, double endDate, java.util.List<java.lang.Integer> teamFilter, java.util.List<java.lang.Integer> typeFilter, java.util.List<java.lang.Integer> statusFilter, int proposalSortMode, int agentSortMode, boolean sortAscending)` Creates a snapshot list of proposals on the server side that can be accessed later in small portions.
    `SchTradeResponseSnapshot` | `openTradeResponseSnapshot(int siteID, int agentID, int origin, double startDate, double endDate, java.util.List<java.lang.Integer> statusFilter, int responseSortMode, int agentSortMode, boolean sortAscending)` Creates a snapshot of the list of responses on the server side that can be accessed later in small portions.
    `SchTradeSnapshot` | `openTradeSnapshot(int siteID, double startDate, double endDate, java.util.List<java.lang.Integer> teamIDArray, java.util.List<java.lang.Integer> agentIDArray, java.util.List<java.lang.Integer> statusFilter, int tradeSortMode, int agentSortMode, boolean sortAscending)` Creates a snapshot of the list of trades on the server side that can be accessed later in small portions.
    `SchTradeNotification` | `pollNotification(long timestamp, int siteID, java.util.List<java.lang.Integer> teamIDArray, java.util.List<java.lang.Integer> agentIDArray, double startDate, double endDate, int detailsLevel, SchAgentDayDetails schDetails, CfgAgentDetails cfgAgentDetails)` Polls the schedule change notification
    `SchTradeProposalStatus` | `postTradeProposal(int siteID, int agentID, java.util.List<java.lang.Double> dateArray, java.lang.String comments)` A trade proposal is posted to the community and is available to all qualifying agents.
    `SchTradeProposalStatus` | `sendPersonalTradeProposal(int siteID, int agentID, int directToAgentID, int handshake, java.util.List<java.lang.Double> dateArray, java.lang.String comments)` A trade proposal is sent directly to specified agent.
    `void` | `sortTradeProposalSnapshot(java.lang.String snapshotID, int proposalSortMode, int agentSortMode, boolean sortAscending)` Changes trade proposal snapshot sort mode and/or order.
    `void` | `sortTradeResponseSnapshot(java.lang.String snapshotID, int responseSortMode, int agentSortMode, boolean sortAscending)` Changes trade response snapshot sort mode and/or order.
    `void` | `sortTradeSnapshot(java.lang.String snapshotID, int tradeSortMode, int agentSortMode, boolean sortAscending)` Changes trade snapshot sort mode and/or order.

- - ### Method Detail

    - #### getTradeProposalByID

          SchTradeProposalHolder getTradeProposalByID(int siteID,
                                                    java.util.List<java.lang.Integer> proposalIDArray,
                                                    int schStateLayout,
                                                    boolean schProvideStateInfo,
                                                    boolean cfgProvideAgentInfo,
                                                    boolean cfgProvideTeamInfo,
                                                    boolean cfgProvideContractInfo)

      Loads the specific trade proposal(s) for the specified Proposal ID.
      Parameters:
        `siteID` - Site identifier
        `proposalIDArray` - List of IDs from the proposal to load
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in the proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent team in the proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in the proposal result set.
      Returns:
        `SchTradeProposalHolder`
      See Also:
        `ESchStateLayout`

    - #### getTradeProposal

          SchTradeProposalHolder getTradeProposal(int siteID,
                                                int agentID,
                                                int origin,
                                                double startDate,
                                                double endDate,
                                                java.util.List<java.lang.Integer> teamFilter,
                                                java.util.List<java.lang.Integer> typeFilter,
                                                java.util.List<java.lang.Integer> statusFilter,
                                                int proposalSortMode,
                                                int agentSortMode,
                                                boolean sortAscending,
                                                int schStateLayout,
                                                boolean schProvideStateInfo,
                                                boolean cfgProvideAgentInfo,
                                                boolean cfgProvideTeamInfo,
                                                boolean cfgProvideContractInfo)

      List the trade proposals for the specified agent by applying the specified filters and a sort order.
      Parameters:
        `siteID` - Site identifier
        `agentID` - An identifier for the agent
        `origin` - My Proposals, Other Proposals, or All Proposals
        `startDate` - Start date of the Date window filter
        `endDate` - End date of the Date window filter
        `teamFilter` - Defines the filter for the team of the proposing agent. A null value means "any team".
        `typeFilter` - Defines filter for the types of proposals. A null value means "all types"
        `statusFilter` - Defines filter for statuses of proposals. A null value means "all statuses"
        `proposalSortMode` - Proposal list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Defines sort order
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide the scheduled state info for every unique state in the proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeProposalHolder`
      See Also:
        `ESchTradeProposalType`, `ESchTradeProposalStatus`, `ESchTradeProposalSortMode`, `ECfgSortMode.Agent`, `ESchStateLayout`

    - #### openTradeProposalSnapshot

          SchTradeProposalSnapshot openTradeProposalSnapshot(int siteID,
                                                           int agentID,
                                                           int origin,
                                                           double startDate,
                                                           double endDate,
                                                           java.util.List<java.lang.Integer> teamFilter,
                                                           java.util.List<java.lang.Integer> typeFilter,
                                                           java.util.List<java.lang.Integer> statusFilter,
                                                           int proposalSortMode,
                                                           int agentSortMode,
                                                           boolean sortAscending)

      Creates a snapshot list of proposals on the server side that can be accessed later in small portions.
      Parameters:
        `siteID` - Site identifier
        `agentID` - An identifier for the agent
        `origin` - My Proposals, Other Proposals, or All Proposals
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `teamFilter` - Defines the filter for the team of the proposing agent. A null value means "any team".
        `typeFilter` - Defines the filter for the types of proposals. A null value means "all types"
        `statusFilter` - Defines the filter for the statuses of proposals. A null value means "all statuses"
        `proposalSortMode` - Proposal list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Returns:
        `SchTradeProposalSnapshot`
      See Also:
        `ESchTradeProposalType`, `ESchTradeProposalStatus`, `ESchTradeProposalSortMode`, `ECfgSortMode.Agent`

    - #### fetchTradeProposalFromSnapshot

          SchTradeProposalHolder fetchTradeProposalFromSnapshot(java.lang.String snapshotID,
                                                              int firstIndex,
                                                              int lastIndex,
                                                              int schStateLayout,
                                                              boolean schProvideStateInfo,
                                                              boolean cfgProvideAgentInfo,
                                                              boolean cfgProvideTeamInfo,
                                                              boolean cfgProvideContractInfo)

      Retrieves a specified range of trade proposals from the snapshot.
      Parameters:
        `snapshotID` - Proposal snapshot ID
        `firstIndex` - First proposal index in snapshot
        `lastIndex` - Last proposal index in snapshot
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in the proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeProposalHolder`
      See Also:
        `ESchStateLayout`

    - #### sortTradeProposalSnapshot

          void sortTradeProposalSnapshot(java.lang.String snapshotID,
                                       int proposalSortMode,
                                       int agentSortMode,
                                       boolean sortAscending)

      Changes trade proposal snapshot sort mode and/or order.
      Parameters:
        `snapshotID` - Proposal snapshot ID
        `proposalSortMode` - Proposal list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      See Also:
        `ESchTradeProposalSortMode`, `ECfgSortMode.Agent`

    - #### getTradeResponseByID

          SchTradeResponseHolder getTradeResponseByID(int siteID,
                                                    java.util.List<java.lang.Integer> responseIDArray,
                                                    int schStateLayout,
                                                    boolean schProvideStateInfo,
                                                    boolean cfgProvideAgentInfo,
                                                    boolean cfgProvideTeamInfo,
                                                    boolean cfgProvideContractInfo)

      Loads specific trade response(s) for the specified Response ID.
      Parameters:
        `siteID` - Site ID
        `responseIDArray` - List of response IDs to load
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeResponseHolder`
      See Also:
        `ESchStateLayout`

    - #### getTradeResponse

          SchTradeResponseHolder getTradeResponse(int siteID,
                                                int agentID,
                                                int origin,
                                                double startDate,
                                                double endDate,
                                                java.util.List<java.lang.Integer> statusFilter,
                                                int responseSortMode,
                                                int agentSortMode,
                                                boolean sortAscending,
                                                int schStateLayout,
                                                boolean schProvideStateInfo,
                                                boolean cfgProvideAgentInfo,
                                                boolean cfgProvideTeamInfo,
                                                boolean cfgProvideContractInfo)

      List trade responses for the specified agent by applying the specified filters and sort order.
      Parameters:
        `siteID` - Site ID
        `agentID` - The ID of the agent receiving or sending responses.
        `origin` - Filter responses for "My Responses", "Responses to My Proposals", and "All Responses related to me".
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `statusFilter` - Defines the filter for statuses of proposals. A null value means "all statuses"
        `responseSortMode` - Response list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeResponseHolder`
      See Also:
        `ESchStateLayout`, `ESchTradeResponseStatus`, `ESchTradeResponseSortMode`, `ECfgSortMode.Agent`

    - #### openTradeResponseSnapshot

          SchTradeResponseSnapshot openTradeResponseSnapshot(int siteID,
                                                           int agentID,
                                                           int origin,
                                                           double startDate,
                                                           double endDate,
                                                           java.util.List<java.lang.Integer> statusFilter,
                                                           int responseSortMode,
                                                           int agentSortMode,
                                                           boolean sortAscending)

      Creates a snapshot of the list of responses on the server side that can be accessed later in small portions.
      Parameters:
        `siteID` - Site ID
        `agentID` - The ID of the agent receiving or sending responses.
        `origin` - Filter responses for "My Responses", "Responses to My Proposals", and "All Responses related to me".
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `statusFilter` - Defines the filter for the statuses of proposals. A null value means "all statuses"
        `responseSortMode` - Response list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Returns:
        `SchTradeResponseSnapshot`
      See Also:
        `ESchTradeResponseStatus`, `ESchTradeResponseSortMode`, `ECfgSortMode.Agent`

    - #### fetchTradeResponseFromSnapshot

          SchTradeResponseHolder fetchTradeResponseFromSnapshot(java.lang.String snapshotID,
                                                              int firstIndex,
                                                              int lastIndex,
                                                              int schStateLayout,
                                                              boolean schProvideStateInfo,
                                                              boolean cfgProvideAgentInfo,
                                                              boolean cfgProvideTeamInfo,
                                                              boolean cfgProvideContractInfo)

      Retrieves a specified range of trade responses from the snapshot.
      Parameters:
        `snapshotID` - Response snapshot ID
        `firstIndex` - First response index in the snapshot
        `lastIndex` - Last response index in the snapshot
        `schStateLayout` - Defines the layout of the returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        List of trade responses and agent info (if requested)
      See Also:
        `ESchStateLayout`, `SchTradeResponseHolder`

    - #### sortTradeResponseSnapshot

          void sortTradeResponseSnapshot(java.lang.String snapshotID,
                                       int responseSortMode,
                                       int agentSortMode,
                                       boolean sortAscending)

      Changes trade response snapshot sort mode and/or order.
      Parameters:
        `snapshotID` - Trade response snapshot ID
        `responseSortMode` - Response list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      See Also:
        `ESchTradeResponseSortMode`, `ECfgSortMode.Agent`

    - #### getTradeByID

          SchTradeHolder getTradeByID(int siteID,
                                    java.util.List<java.lang.Integer> tradeIDArray,
                                    int schStateLayout,
                                    boolean schProvideStateInfo,
                                    boolean cfgProvideAgentInfo,
                                    boolean cfgProvideTeamInfo,
                                    boolean cfgProvideContractInfo)

      Loads the specific trade for the specified Trade ID.
      Parameters:
        `siteID` - Site ID
        `tradeIDArray` - A list of trade IDs to load
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        Trade result set holder
      See Also:
        `ESchStateLayout`, `SchTradeHolder`

    - #### getTrade

          SchTradeHolder getTrade(int siteID,
                                double startDate,
                                double endDate,
                                java.util.List<java.lang.Integer> teamIDArray,
                                java.util.List<java.lang.Integer> agentIDArray,
                                java.util.List<java.lang.Integer> statusFilter,
                                int tradeSortMode,
                                int agentSortMode,
                                boolean sortAscending,
                                int schStateLayout,
                                boolean schProvideStateInfo,
                                boolean cfgProvideAgentInfo,
                                boolean cfgProvideTeamInfo,
                                boolean cfgProvideContractInfo)

      List trades by applying specified filters and sort order.
      Parameters:
        `siteID` - Site ID
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `statusFilter` - Defines filter for statuses of trades. A null value means "all statuses"
        `tradeSortMode` - Proposal Agent, Response Agent. Proposal Paid Hours, Response Paid Hours, Status or None,
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeHolder`
      See Also:
        `ESchTradeStatus`, `ESchTradeSortMode`, `ECfgSortMode.Agent`, `ESchStateLayout`

    - #### openTradeSnapshot

          SchTradeSnapshot openTradeSnapshot(int siteID,
                                           double startDate,
                                           double endDate,
                                           java.util.List<java.lang.Integer> teamIDArray,
                                           java.util.List<java.lang.Integer> agentIDArray,
                                           java.util.List<java.lang.Integer> statusFilter,
                                           int tradeSortMode,
                                           int agentSortMode,
                                           boolean sortAscending)

      Creates a snapshot of the list of trades on the server side that can be accessed later in small portions.
      Parameters:
        `siteID` - Site ID
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `teamIDArray` - Defines filter for agent teams participating in schedule trades. A null value means no team filter.
        `agentIDArray` - Defines filter for agents participating in schedule trades. A null value means no agent filter.
        `statusFilter` - Defines filter for statuses of trades. A null value means "all statuses"
        `tradeSortMode` - Proposal or Response Agent; Proposal or Response Paid Hours; Status or None,
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Returns:
        `SchTradeSnapshot`
      See Also:
        `ESchTradeStatus`, `ESchTradeSortMode`, `ECfgSortMode.Agent`

    - #### fetchTradeFromSnapshot

          SchTradeHolder fetchTradeFromSnapshot(java.lang.String snapshotID,
                                              int firstIndex,
                                              int lastIndex,
                                              int schStateLayout,
                                              boolean schProvideStateInfo,
                                              boolean cfgProvideAgentInfo,
                                              boolean cfgProvideTeamInfo,
                                              boolean cfgProvideContractInfo)

      Retrieves a specified range of trades from the snapshot.
      Parameters:
        `snapshotID` - Trade snapshot ID
        `firstIndex` - First trade index in snapshot
        `lastIndex` - Last trade index in snapshot
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" calls for short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" calls for short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" calls for short information about every unique agent's contract in a proposal result set.
      Returns:
        List of trades and agent info (if requested) `SchTradeHolder`
      See Also:
        `ESchStateLayout`

    - #### sortTradeSnapshot

          void sortTradeSnapshot(java.lang.String snapshotID,
                               int tradeSortMode,
                               int agentSortMode,
                               boolean sortAscending)

      Changes trade snapshot sort mode and/or order.
      Parameters:
        `snapshotID` - Trade snapshot ID
        `tradeSortMode` - Proposal or Response Agent; Proposal or Response Paid Hours; Status or None.
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      See Also:
        `ESchTradeSortMode`, `ECfgSortMode.Agent`

    - #### postTradeProposal

          SchTradeProposalStatus postTradeProposal(int siteID,
                                                 int agentID,
                                                 java.util.List<java.lang.Double> dateArray,
                                                 java.lang.String comments)

      A trade proposal is posted to the community and is available to all qualifying agents.
      Parameters:
        `siteID` - Site identifier
        `agentID` - Agent identifier
        `dateArray` - List of dates that schedule's agent wants to trade
        `comments` - Comments to proposal
      Returns:
        Newly created proposal identifier and status. An invalid status indicates failed operation.

    - #### sendPersonalTradeProposal

          SchTradeProposalStatus sendPersonalTradeProposal(int siteID,
                                                         int agentID,
                                                         int directToAgentID,
                                                         int handshake,
                                                         java.util.List<java.lang.Double> dateArray,
                                                         java.lang.String comments)

      A trade proposal is sent directly to specified agent. Personal proposal can have one-way or two-way handshake assigned. One-way handshake does not require a response from responding agent. It assumes that the proposing agent is aware of the responding agent's schedule, and is ready to trade upon proposal's acceptance by the responding agent. A two-way handshake requires acceptance of response by the proposing agent after the proposal is accepted by the responding agent.
      Parameters:
        `siteID` - Site identifier
        `agentID` - An identifier for the agent sending the proposal
        `directToAgentID` - An identifier for the agent that should receive a personal proposal
        `handshake` - one-way handshake or two-way handshake
        `dateArray` - List of dates that the schedule's agent wants to trade
        `comments` - Comments to proposal
      Returns:
        Newly created proposal identifier and status. An invalid status indicates failed operation.
      See Also:
        `ESchTradeHandshakeType`

    - #### cancelTradeProposal

          SchTradeProposalStatus cancelTradeProposal(int siteID,
                                                   int agentID,
                                                   int proposalID,
                                                   java.lang.String comments)

      A proposal can be canceled by the proposing agent at any time while it is in an "Open" or "In Review" status. If the proposal is canceled, all responses to this proposal are automatically canceled as well. If there is a trade pending for this proposal, it is also canceled.
      Parameters:
        `siteID` - Site identifier
        `agentID` - An idendifier of the agent canceling the proposal. This ID must be the same as the identifier for the agent who created the proposal.
        `proposalID` - Identifier for the proposal to cancel
        `comments` - Comments explaining why the proposal was canceled (optional). These comments are appended to the comments field in the proposal and response record (if there is any).
      Returns:
        Trade proposal status

    - #### declineTradeResponse

          SchTradeResponseStatus declineTradeResponse(int siteID,
                                                    int agentID,
                                                    int responseID,
                                                    java.lang.String comments)

      A proposing agent can opt to decline a response from the community to a community proposal, as well as the response from an agent responding to a personal proposal, if a two-way handshake was requested. Once accepted, a response cannot be declined by the proposing agent.
      Parameters:
        `siteID` - Site identifier
        `agentID` - An identifier for the agent declining the response. This ID must be the same as the identifier for the agent who created the proposal.
        `responseID` - Identifier for the response to decline
        `comments` - Comments explaining why the response was declined (optional). These comments are appended to the comments field in the response record.
      Returns:
        Trade response status

    - #### acceptTradeResponse

          SchTradeProposalStatus acceptTradeResponse(int siteID,
                                                   int agentID,
                                                   int proposalID,
                                                   int responseID,
                                                   java.lang.String comments)

      A response to the proposal should be accepted by the proposing agent in order to schedule the trade to be submitted for approval. An exception to this is a personal proposal with a one-way handshake. In that case, the trade is submitted upon acceptance by the responding agent.
      Parameters:
        `siteID` - Site identifier
        `agentID` - The identifier for the agent accepting the response. This ID must be the same as the identifier for the agent who created the proposal.
        `proposalID` - The identifier for the proposal
        `responseID` - The identifier for the response to the proposal
        `comments` - Comments addressed to supervisor (optional). These comments are written to the comments field in trade record.
      Returns:
        Trade proposal status

    - #### acceptTradeProposal

          SchTradeResponseStatus acceptTradeProposal(int siteID,
                                                   int agentID,
                                                   int proposalID,
                                                   java.lang.String comments)

      Acceptance of the proposal creates a response record, which goes back to the proposing agent for a final handshake. An exception to this is a personal proposal with a one-way handshake. In that case acceptance of the proposal by the responding agent automatically submits a trade record for approval.
      Parameters:
        `siteID` - Site identifier
        `agentID` - The identifier for the agent accepting trade proposal
        `proposalID` - Identifier of the proposal to accept
        `comments` - Comments addressed to proposing agent. These comments are written to the comments field in the response record.
      Returns:
        Newly created response identifier and status. An invalid status indicates failed operation.

    - #### declinePersonalTradeProposal

          SchTradeProposalStatus declinePersonalTradeProposal(int siteID,
                                                            int agentID,
                                                            int proposalID,
                                                            java.lang.String comments)

      The responding agent may opt to decline a personal trade proposal. Community trade proposals cannot be declined by the responding agent. Once accepted, a personal trade proposal cannot be declined.
      Parameters:
        `siteID` - Site identifier
        `agentID` - The identifier for the agent declining trade proposal
        `proposalID` - Identifier of the proposal to decline
        `comments` - Comments addressed to proposing agent
      Returns:
        Trade response status

    - #### cancelTradeResponse

          SchTradeResponseStatus cancelTradeResponse(int siteID,
                                                   int agentID,
                                                   int responseID,
                                                   java.lang.String comments)

      A response to a proposal can be canceled by the responding agent at any time while the proposal is in "Accept" or "In Review" status. If the response is canceled, a corresponding proposal is re-listed (reset to "Open" status), and the pending trade (if any) is canceled.
      Parameters:
        `siteID` - Site identifier
        `agentID` - The identifier for the agent canceling response. This ID must be the same as the identifier for the agent who accepted the proposal.
        `responseID` - Identifier of the response to cancel
        `comments` - Comments explaining why the response was canceled (optional). These comments are appended to the comments field in the response record.
      Returns:
        Trade response status

    - #### approveTrade

          SchTradeStatus approveTrade(int siteID,
                                    int tradeID,
                                    java.lang.String comments)

      A supervisor may approve a pending trade.
      Parameters:
        `siteID` - Site identifier
        `tradeID` - Trade identifier
        `comments` - Comments (optional). These comments are appended to the comments field in trade, proposal, and response records.
      Returns:
        Status of trade: Approved, Denied, or In Review
      See Also:
        `ESchTradeStatus`

    - #### declineTrade

          SchTradeStatus declineTrade(int siteID,
                                    int tradeID,
                                    java.lang.String comments)

      A supervisor may decline the trade.
      Parameters:
        `siteID` - Site identifier
        `tradeID` - Trade identifier
        `comments` - Comments explaining why the trade was declined (required). These comments are appended to the comments field in the trade, proposal, and response records. In the case of an auto-decline, a reason is generated automatically by the system.
      Returns:
        Status of trade: Approved, Denied, or In Review
      See Also:
        `ESchTradeStatus`

    - #### checkTrade

          SchValidationHolder checkTrade(int siteID,
                                       int tradeID)

      Checks weather the trade would violate any "soft" or "hard" constraints.
      Parameters:
        `siteID` - Site identifier
        `tradeID` - Trade identifier
      Returns:
        Validation warnings and errors
      See Also:
        `SchValidationHolder`

    - #### getTradeCandidates

          SchCandidate getTradeCandidates(int siteID,
                                        int agentID,
                                        java.util.List<java.lang.Double> days,
                                        java.util.List<java.lang.Integer> teamIDFilter)

      Retrieves the list of agents for whom the agent trade is possible
      Parameters:
        `siteID` - Site identifier
        `agentID` - Agent identifier
        `days` - List of dates
        `teamIDFilter` - Team filter (null means "any team")
      Returns:
        `SchCandidate`

    - #### getUnanswered

          SchTradeUnansweredHolder getUnanswered(int siteID,
                                               int agentID,
                                               double startDate,
                                               double endDate)

      Retrieves agent proposals with no responses
      Parameters:
        `siteID` - Site identifier
        `agentID` - Agent identifier
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
      Returns:
        `SchTradeUnansweredHolder`

    - #### pollNotification

          SchTradeNotification pollNotification(long timestamp,
                                              int siteID,
                                              java.util.List<java.lang.Integer> teamIDArray,
                                              java.util.List<java.lang.Integer> agentIDArray,
                                              double startDate,
                                              double endDate,
                                              int detailsLevel,
                                              SchAgentDayDetails schDetails,
                                              CfgAgentDetails cfgAgentDetails)

      Polls the schedule change notification
      Parameters:
        `timestamp` - A timestamp value to use as a baseline for notifications. A value of zero implies the current moment, and a negative value tells the server to use the last acknowledged timestamp as a baseline.
        `siteID` - Site ID
        `teamIDArray` - Team ID filter. Can be null meaning "any team"
        `agentIDArray` - Agent ID filter. Can be null meaning "all agents for specified teams". If teams were not specified, this means "all agents".
        `startDate` - Start date of schedule range that needs to be tracked for changes. `OleDateTime`
        `endDate` - End date of schedule range that needs to be tracked for changes. `OleDateTime`
        `detailsLevel` - Notification details level `ESchTradeAuditLevel`
        `schDetails` - Schedule details `SchAgentDayDetails`
      Returns:
        `SchTradeNotification`

    - #### acknowledgeNotification

          void acknowledgeNotification(int siteID,
                                     long timestamp)

      Acknowledges to the server that the notification was received and processed. See also `pollNotification`.
      Parameters:
        `siteID` - Site ID
        `timestamp` - A timestamp value from `SchTradeNotification` returned by `pollNotification`

Copyright © 2005-2016 Genesys Telecommunications Labs, Inc. All Rights Reserved.