SWS2 GetDataView Method – sws_rental_prospects_v
Allows you to retrieve a list of quoted, soft-reserved and hard-reserved reservations. This view requires at least one parameter by which to filter.
Returned Columns
Name | Data Type |
---|---|
SITE_ID | Long |
Description | The site’s ID number. This can be found using the GetSiteList method. |
SITE_NUMBER | String |
Description | The organization assigned site number. This is not the site ID. |
ACCT_ID | Long |
Description | The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method. |
ACCT_NAME | String |
Description | The name on the account. This may differ from the primary contact’s name in some instances, such as a business account or a guardianship account. |
UNIT_ID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
UNIT_NUMBER | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
RENTAL_ID | Long |
Description | The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. |
RESERVATION_DATE | DateTime |
Description | The date the quote/reservation was originally created. |
PAID_THRU_DATE | DateTime |
Description | If the unit has been rented, this is the date the customer has paid through. |
QUOTE_ID | Long |
Description | The quote/reservation’s ID number. |
SITE_CLASS_ID | Long |
Description | The ID of the class to which the unit belongs. |
EXPIRATION | DateTime |
Description | The date the quote/reservation will no longer be available. |
QUOTE_STATUS | Integer |
Description | The numeric value for the status of the quote/reservation.
|
QUOTE_STATUS_VALUE | String |
Description | The textual value for the status of the quote/reservation. |
QUOTE_TYPE | Integer |
Description | The type of quote/reservation that was created.
|
QUOTE_TYPE_VALUE | String |
Description | The textual value for the QUOTE_TYPE of the reservation. |
ATTRIBUTE01 | Integer |
Description | The numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE01_VAL | String |
Description | The textual value for the “Attribute01” custom lookup as defined by the site. See eUnitAttr01 for the available values. |
ATTRIBUTE02 | Integer |
Description | The numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
ATTRIBUTE02_VAL | String |
Description | The textual value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
CLIMATE | Integer |
Description | The textual value for the “Climate” custom lookup as defined by the site. See eUnitClimate for the available values. |
CLIMATE_VAL | String |
Description | The numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
WIDTH | Integer |
Description | The width measurement of the unit. |
DEPTH | Integer |
Description | The depth measurement of the unit. |
SQ_FEET | Integer |
Description | The total square feet of the unit, calculated by multiplying the width and the depth measurements. |
FEATURES | Integer |
Description | The numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FEATURES_VAL | String |
Description | The textual value for the “Features” custom lookup as defined by the site. See eUnitFeatures for the available values. |
ACCESS_TYPE | Integer |
Description | The numeric value for the “Access Type” custom lookup as defined by the site. See eUnitAccessType for the available values. |
ACCESS_TYPE_VAL | String |
Description | The textual value for the “Access Type” custom lookup as defined by the site. See eUnitAccessType for the available values. |
DOOR | Integer |
Description | The numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
DOOR_VAL | String |
Description | The textual value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
PRICE | Decimal |
Description | The price quoted in the quote/reservation. |
START_RENT_RATE | Decimal |
Description | The applicable starting rent rate of the unit. |
PRORATE_AMT | Decimal |
Description | The amount that will be paid, in rent, at the time of the move-in. This is based on today’s date any discounts that were quoted at the time the quote/reservation was created. |
LOST_DEMAND_REASON | Integer |
Description | The customizable reason that the customer didn’t complete a rental for a unit. Contact the organization for the list. |
INQUIRY_SOURCE | Integer |
Description | The customizable list of ways that a customer heard about the organization/site. Contact the organization for the list. |
ADMIN_FEE | Decimal |
Description | A fee assessed to cover the administrative costs of setting up the rental. |
TAX | Decimal |
Description | The tax applicable to the unit. This is based on the prorated amount. |
DEPOSIT | Decimal |
Description | The security deposit due at the time of rental. |
RES_DEPOSIT | Decimal |
Description | The amount required to hold the reservation. This can only be applied to soft and hard reservations. |
DISC_AMT | Decimal |
Description | The dollar amount of any applicable discounts that have been quoted. |
TOT_AMT | Decimal |
Description | The total amount due at the time of move-in based on the prorated amount, the applicable taxes and any discounts that apply. |
QUOTE_START_DATE | DateTime |
Description | The date the quote/reservation was created. |
CFLEX01 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX02 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX03 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX04 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CFLEX05 | String |
Description | A custom field, set up by the organization, designed to hold additional account level information. This is displayed in the “Account Information” tab of the account in the Store application. |
CHANNEL | Integer |
Description | The means by which the user has access to the store application. Contact the organization for the available options. |
MKT_CODE | Integer |
Description | Similar to the inquiry source, this is a custom field to describe how the customer heard about the organization site. |
MKT_SOURCE | String |
Description | Similar to the inquiry source, this is a custom field to describe how the customer heard about the organization site. |
QUOTE_CREATED | DateTime |
Description | The date the quote/reservation was originally created. |
QUOTE_UPDATED | DateTime |
Description | The date the quote/reservation was last updated. |
QUOTE_CREATED_BY | Long |
Description | The user’s ID number that created the quote/reservation. |
QUOTE_UPDATED_BY | Long |
Description | The user’s ID number that last updated the quote/reservation. |
Example
We’ll assume you’ve got a web reference, let’s name it Store, in your Visual Studio project. At this point we need to reference our objects. We’ll need the standard service object, a GetDataView_Request request object and a ParameterValues object. You will also need to pass in credentials. We can define and create those like this:
// Create a request and response objects
StoreServiceClient client = new StoreServiceClient();
GetDataView_Request request = new GetDataView_Request();
ParameterValues parms = new Store.ParameterValues();
As with every method we need to pass in credentials. We also set up the parameters for our request.
//get data view setup
client.ChannelFactory.Credentials.UserName.UserName = "user";
client.ChannelFactory.Credentials.UserName.Password = "pass";
client.ChannelFactory.Credentials.SupportInteractive = true;
parms.FilterType = 3;
parms.ParameterName = "quote_created";
parms.ParameterValue = "01-MAR-2017";
request.OrgID = 123456;
request.SiteID = 123456;
request.ViewName = "sws_rental_prospects_v";
request.Parameters = new ParameterValues[] { parms };
Finally we can call the method and pass across the login object and the request object to retrieve the data. It’s a good idea to do this in a Try Catch block.
try
{
// Call the method that will load the response object
object resp;
resp = client.GetDataView(request);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Note that if something goes wrong the service will respond with an exception. You’ll want to take a look at that message returned in that exception so it can be debugged.
For a full list of methods see SWS2 Methods.