Find and Filter Proposals

5 minute read

When you work with proposals, you may need to retrieve a specific proposal, filter them by status, provider, or assigned user, or find proposals submitted through an RFP.

Retrieve a Proposal

You can retrieve proposal details by the proposal number or ID.

Get a Proposal by Number

The proposal number is available in the UI in Service Automation and Provider Automation. Send the request below to retrieve a proposal by its Number.

GET odata/proposals?filter=Number eq ‘{ProposalNumber}’

Parameter Parameter type Example value
$filter Query Number eq ‘prp50520123151873’

Example request:

GET https://sb2api.servicechannel.com/v3/odata/proposals?$filter=Number%20eq%20%27prp50520123151873%27 HTTP/1.1
Authorization: Bearer {access_token}

Example response

{
   "@odata.context": "https://sb2api.servicechannel.com/v3/odata/$metadata#proposals",
   "value": [
      {
         "Id": 10010836,
         "Number": "prp50520123151873",
         "Description": "New doors for renovated location",
         "Description2": null,
         "Comments": null,
         "CreatedDate": "2020-05-05T12:31:51.873-04:00",
         "CreatedDate_dto": "2020-05-05T08:31:51.8657321-04:00",
         "CreatedBy": {
            "Id": 0,
            "UserName": "",
            "FullName": "",
            "Email": "",
            "LevelInfo": null
         },
         "SubmittedTo": null,
         "Status": {
            "Primary": "Open",
            "Extended": "",
            "ModifiedDate": "2020-05-05T08:31:51.88-04:00",
            "ModifiedDate_dto": "2020-05-05T08:31:51.8813596-04:00",
            "ModifiedBy": ""
         },
         "AssignedTo": {
            "Id": null,
            "UserName": null,
            "FullName": null,
            "Email": null,
            "LevelInfo": null
         },
         "ScheduledDate": null,
         "AmountCategories": [
            {
               "Id": 48389714,
               "Name": "Materials",
               "TotalCost": 1600
            },
            {
               "Id": 48389715,
               "Name": "Installation Labor",
               "TotalCost": 160
            },
            {
               "Id": 48389716,
               "Name": "Non-Installation Expenses",
               "TotalCost": 40
            },
            {
               "Id": 48389717,
               "Name": "Freight",
               "TotalCost": 50
            },
            {
               "Id": 48389718,
               "Name": "Tax",
               "TotalCost": 50
            },
            {
               "Id": 48389719,
               "Name": "Costs incurred to date",
               "TotalCost": null
            }
         ],
         "UpdatedDate": "2020-05-05T08:31:51.88-04:00",
         "Recommendation": null,
         "Amount": 1900,
         "AssignedFromLevel": "",
         "AssignedToLevel": "",
         "LevelsEscalateTo": [],
         "Actions": [],
         "MlpRecommendations": [],
         "MlpRecommendation": {
            "Id": 0,
            "ProposalId": 0,
            "UserId": 0,
            "Status": null,
            "WoType": "Origin",
            "OriginalTrackingNumber": null,
            "SelectedTrackingNumber": null,
            "GeneratedTrackingNumber": null,
            "PoNumber": null,
            "Category": null,
            "CategoryId": null,
            "ApprovalCode": null,
            "Priority": null,
            "Comment": null,
            "RejectCodeId": null,
            "ApprovalReason": null,
            "EmailsToNotify": null,
            "Applied": false,
            "EmailMyself": false,
            "MyEmail": null,
            "NotSavedRecommendation": false
         },
         "CurrentProposalMlpRuleSetId": null,
         "CurrentProposalMlpRuleSetName": null,
         "CurrentProposalMlpLevelId": null,
         "CurrentProposalMlpLevelName": null,
         "PoNumber": null,
         "IsMlpLimitOverrun": false,
         "NextLevelEmpty": false,
         "RFP@odata.navigationLink": "https://sb2api.servicechannel.com/v3/odata/rfps(894450)",
         "attachments@odata.navigationLink": "https://sb2api.servicechannel.com/v3/odata/proposals(10010836)/attachments"
      }
   ]
}

Response code: HTTP/1.1 200 OK

Note: Because Number is not a unique value in the ServiceChannel system, multiple proposals may be returned in the response body. You can retrieve a specific proposal by its unique Id as described below.

Get a Proposal by ID

If you have already retrieved the proposal ID via the API, use the Id value to pass the following request:

GET odata/proposals?filter=Id eq {ProposalId}

Parameter Parameter type Example value
$filter Query Id eq 10010836

Example request:

GET https://sb2api.servicechannel.com/v3/odata/proposals?$filter=Id%20eq%2010010836 HTTP/1.1
Authorization: Bearer {access_token}

Example response

{
   "@odata.context": "https://sb2api.servicechannel.com/v3/odata/$metadata#proposals",
   "value": [
      {
         "Id": 10010836,
         "Number": "prp50520123151873",
         "Description": "New doors for renovated location",
         "Description2": null,
         "Comments": null,
         "CreatedDate": "2020-05-05T12:31:51.873-04:00",
         "CreatedDate_dto": "2020-05-05T08:31:51.8657321-04:00",
         "CreatedBy": {
            "Id": 0,
            "UserName": "",
            "FullName": "",
            "Email": "",
            "LevelInfo": null
         },
         "SubmittedTo": null,
         "Status": {
            "Primary": "Open",
            "Extended": "",
            "ModifiedDate": "2020-05-05T08:31:51.88-04:00",
            "ModifiedDate_dto": "2020-05-05T08:31:51.8813596-04:00",
            "ModifiedBy": ""
         },
         "AssignedTo": {
            "Id": null,
            "UserName": null,
            "FullName": null,
            "Email": null,
            "LevelInfo": null
         },
         "ScheduledDate": null,
         "AmountCategories": [
            {
               "Id": 48389714,
               "Name": "Materials",
               "TotalCost": 1600
            },
            {
               "Id": 48389715,
               "Name": "Installation Labor",
               "TotalCost": 160
            },
            {
               "Id": 48389716,
               "Name": "Non-Installation Expenses",
               "TotalCost": 40
            },
            {
               "Id": 48389717,
               "Name": "Freight",
               "TotalCost": 50
            },
            {
               "Id": 48389718,
               "Name": "Tax",
               "TotalCost": 50
            },
            {
               "Id": 48389719,
               "Name": "Costs incurred to date",
               "TotalCost": null
            }
         ],
         "UpdatedDate": "2020-05-05T08:31:51.88-04:00",
         "Recommendation": null,
         "Amount": 1900,
         "AssignedFromLevel": "",
         "AssignedToLevel": "",
         "LevelsEscalateTo": [],
         "Actions": [],
         "MlpRecommendations": [],
         "MlpRecommendation": {
            "Id": 0,
            "ProposalId": 0,
            "UserId": 0,
            "Status": null,
            "WoType": "Origin",
            "OriginalTrackingNumber": null,
            "SelectedTrackingNumber": null,
            "GeneratedTrackingNumber": null,
            "PoNumber": null,
            "Category": null,
            "CategoryId": null,
            "ApprovalCode": null,
            "Priority": null,
            "Comment": null,
            "RejectCodeId": null,
            "ApprovalReason": null,
            "EmailsToNotify": null,
            "Applied": false,
            "EmailMyself": false,
            "MyEmail": null,
            "NotSavedRecommendation": false
         },
         "CurrentProposalMlpRuleSetId": null,
         "CurrentProposalMlpRuleSetName": null,
         "CurrentProposalMlpLevelId": null,
         "CurrentProposalMlpLevelName": null,
         "PoNumber": null,
         "IsMlpLimitOverrun": false,
         "NextLevelEmpty": false,
         "RFP@odata.navigationLink": "https://sb2api.servicechannel.com/v3/odata/rfps(894450)",
         "attachments@odata.navigationLink": "https://sb2api.servicechannel.com/v3/odata/proposals(10010836)/attachments"
      }
   ]
}

Response code: HTTP/1.1 200 OK

Filter Proposals by Status

You may need to filter submitted proposals by status. Use the request below to retrieve the IDs of proposals in a certain status. For example, we can get proposals with the Open primary status.

GET /odata/proposals?$select=Id&$filter=Status/Primary eq ‘{ProposalPrimaryStatus}’

Parameter Parameter type Example value Note
$select Query Id  
$filter Query Status/Primary eq ‘Open’ Valid statuses: Open, On Hold, Approved, Rejected.

Example request:

GET https://sb2api.servicechannel.com/v3/odata/proposals?$select=Id&$filter=Status/Primary%20eq%20%27Open%27 HTTP/1.1
Authorization: Bearer {access_token}

Example response

{
   "@odata.context": "https://sb2api.servicechannel.com/v3/odata/$metadata#proposals(Id)",
   "value": [
      {
         "Id": 10010836
      },
      {
         "Id": 10024251
      },
      {
         "Id": 10024252
      }
   ]
}

Response code: HTTP/1.1 200 OK

Retrieve Proposals Assigned to a Specific Provider

Before passing the API request to retrieve proposals assigned to a particular provider, get the provider Id.

Id

Provider ID is a unique numeric identifier of the provider in the ServiceChannel system.

Find the required provider by sending one of the following requests, and save the provider Id.

Now that you have the provider Id, you can retrieve proposals assigned to this provider.

GET /odata/proposals?$select=Id&$filter=Provider/Id eq {ProviderId}

Parameter Parameter type Example value
$select Query Id
$filter Query Provider/Id eq 2000090505

Example request:

GET https://sb2api.servicechannel.com/v3/odata/proposals?$select=Id&$filter=AssignedTo/Id%20eq%2000090505 HTTP/1.1
Authorization: Bearer {access_token}

Example response

{
   "@odata.context": "https://sb2api.servicechannel.com/v3/odata/$metadata#proposals(Id)",
   "value": [
      {
         "Id": 10010836
      },
      {
         "Id": 10024251
      },
      {
         "Id": 10024252
      }
   ]
}

Response code: HTTP/1.1 200 OK

Get Proposals Assigned to a Particular User

To filter proposals assigned to a specific employee in your organization, first get the user Id.

Id

User ID is a unique numeric identifier of the user in the ServiceChannel system.

You can retrieve users of the current subscriber by passing one of the following requests. You need to find the Id field in the response body.

Submit this API request to get the IDs of proposals assigned to a particular user in your company.

GET /odata/proposals?$select=Id&$filter=AssignedTo/Id eq {UserId}

Parameter Parameter type Example value
$select Query Id
$filter Query AssignedTo/Id eq 1417703

Example request:

GET https://sb2api.servicechannel.com/v3/odata/proposals?$select=Id&$filter=AssignedTo/Id%20eq%201417703 HTTP/1.1
Authorization: Bearer {access_token}

Example response

{
   "@odata.context": "https://sb2api.servicechannel.com/v3/odata/$metadata#proposals(Id)",
   "value": [
      {
         "Id": 10010836
      }
   ]
}

Response code: HTTP/1.1 200 OK

Find Proposals Submitted Through an RFP

Providers can create proposals in response to a subscriber’s RFP. To find proposals submitted through an RFP, get the RFP ID, and then pass the below request:

GET odata/rfps({rfpId})/proposals?$select=Id

Parameter Parameter type Example value
rfpId Path 894450
$select Query Id

Example request:

GET https://sb2api.servicechannel.com/v3/odata/rfps(894450)/proposals?$select=Id HTTP/1.1
Authorization: Bearer {access_token}

Example response

{
   "@odata.context": "https://sb2api.servicechannel.com/v3/odata/$metadata#proposals(Id)",
   "value": [
      {
         "Id": 10010836
      }
   ]
}

Response code: HTTP/1.1 200 OK

If there are proposals submitted through the specified RFP, their IDs are returned in the response body.

Updated: