Archive
SWS GetUnitDataWithPromos Method
Retrieves a collection of unit data for the specified site based on the the filters requested. Can include promotional data.
Parameters
Name | DataType | Is Required |
---|---|---|
AccessType | Integer | Optional |
Description | The numeric value for the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. | |
Attribute01 | Integer | Optional |
Description | The numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. | |
Attribute02 | Integer | Optional |
Description | The numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. | |
ClassType | Long | Optional |
Description | The numeric value for the “Class” custom look up as defined by the site. See eUnitClass for the available values. | |
Climate | Integer | Optional |
Description | The numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. | |
Depth | Decimal | Optional |
Description | The depth measurment for the unit. This can also be an array. | |
Door | Integer | Optional |
Description | The numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. | |
Features | Integer | Optional |
Description | The numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. | |
HardReservable | Boolean | Optional |
Description | Applies a filter to returne units that are available to be place on a hard reservation (“True”) or not (“False”). | |
Height | Decimal | Optional |
Description | The height measurement of the unit. This can also be an array. | |
MaxRentRate | Decimal | Optional |
Description | Adds a filter to limit the units returned to this amount for the maximum rent rate. | |
MinRentRate | Decimal | Optional |
Description | Adds a filter to limit the units returned to this amount for the minimum rent rate. | |
ObjectGroup | ObjectGroups | Optional |
Description | The rental object group name. Available values:
|
|
PromoDataType | PCDTypeOptions | Optional |
Description | Filters the return to only those units with the specified promotion type. Available values:
|
|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
SoftReservable | Boolean | Optional |
Description | Applies a filter to return units that are available to be place on a soft reservation (“True”) or not (“False”). | |
Status | ArrayOfUnitStatusValues | Optional |
Description | The numeric status attribute value for the unit. Available values:
|
|
UnitIDs | Long | Optional |
Description | The unit ID or an array of unit IDs. This is returned when you use any of the GetSiteUnitData calls and is maintained through rentals. | |
UnitNumbers | String | Optional |
Description | The unit’s number, or an array of unit numbers, as assigned by the organization. This is not the UnitID. | |
Width | Decimal | Optional |
Description | The unit width or an array of unit widths. |
Returned Parameters
Name | DataType |
---|---|
AccessValue | String |
Description | The textual value for the “Access Type” custom lookup as defined by the site. See eUnitAccessType for the available values. |
AccessValueID | Integer |
Description | The numeric value for the “Access Type” custom look up as defined by the site. See eUnitAccessType for the available values. |
AlarmChannel | Integer |
Description | No longer used. |
Attribute01Value | String |
Description | The textual value for the “Attribute01” custom lookup as defined by the site. See eUnitAttr01 for the available values. |
Attribute01ValueID | Integer |
Description | The numeric value for the “Attribute01” custom look up as defined by the site. See eUnitAttr01 for the available values. |
Attribute02Value | String |
Description | The textual value for the “Attribute02” custom lookup as defined by the site. See eUnitAttr02 for the available values. |
Attribute02ValueID | Integer |
Description | The numeric value for the “Attribute02” custom look up as defined by the site. See eUnitAttr02 for the available values. |
ClassActive | Boolean |
Description | Indicates if the revenue class is active (“True”) or not (“False”). |
ClassDescription | String |
Description | The textual value for the “Class” custom lookup as defined by the site. See eUnitClass for the available values. |
ClimateValue | String |
Description | The textual value for the “Climate” custom lookup as defined by the site. See eUnitClimate for the available values. |
ClimateValueID | Integer |
Description | The numeric value for the “Climate” custom look up as defined by the site. See eUnitClimate for the available values. |
CreatedBy | Long |
Description | The ID of the store user who created the unit. |
CreatedDate | DateTime |
Description | The date the unit was created. |
PromotionCollection | APPL_BEST_PCD |
Description | The object containing all the PCD details. |
DeepestDiscount | PCDItem |
Description | The object containing the discount level details. |
DelinquencyModelID | Long |
Description | The ID of the delinquency schedule assigned to the unit. |
DepositGroupID | Long |
Description | The deposit schedule ID assigned to the unit. |
Depth | Decimal |
Description | The unit’s depth measurement. |
DoorValue | String |
Description | The textual value for the “Door” custom lookup as defined by the site. See eUnitDoor for the available values. |
DoorValueID | Integer |
Description | The numeric value for the “Door” custom look up as defined by the site. See eUnitDoor for the available values. |
FeaturesValue | String |
Description | The textual value for the “Features” custom lookup as defined by the site. See eUnitFeatures for the available values. |
FeaturesValueID | Integer |
Description | The numeric value for the “Features” custom look up as defined by the site. See eUnitFeatures for the available values. |
FeeObjectID | Long |
Description | The ID of the admin fee assigned to the revenue class to which the unit belongs. |
FOMIndicator | Boolean |
Description | Indicates if the unit is a first of the month rental cycle (“True”) or not (“False”). |
FutureRate | Decimal |
Description | If there is a rate change scheduled on the unit, this indicates the amount of the new rate. |
GateKeyPadZone | Integer |
Description | The gate keypad zone assigned to the unit. |
HardReservable | Boolean |
Description | Indicates if the unit can be place on a hard reservation (“True”) or not (“False”). |
Height | Decimal |
Description | The unit’s height measurement. |
Icon | String |
Description | The URL to the icon displayed in the Store application. |
IsPortable | Boolean |
Description | Indicates if the unit is portable (“True”) or not (“False”). |
LeaseGroupID | Long |
Description | The ID of the group of lease documents assigned to the unit’s revenue class. |
LinkID | Long |
Description | Not currently used. |
MaximumRate | Decimal |
Description | The maximum rate for which a unit of this type will rent. |
MinimumRate | Decimal |
Description | The minimum rate for which a unit of this type will rent. |
MUX | Integer |
Description | Not currently used. |
Notes | String |
Description | Any notes about the unit. |
ObjectGroup | ObjectGroups |
Description | Indicates the object group to which the unit belongs. Available values:
|
ObjectPeriodUOM | String |
Description | Indicates the length of the unit’s cycle. Currently all cycles are “Month”. |
OrgClassID | Long |
Description | The ID of the revenue class to which the unit belongs. |
ProformaRate | Decimal |
Description | The current proforma rate assigned to the unit. |
PushRate | Decimal |
Description | The current push rate assigned to the unit. |
RackRate | Decimal |
Description | The current rack rate assigned to the unit. |
RentRate | Decimal |
Description | The current rent rate assigned to the unit. |
ReservationAmount | Decimal |
Description | The amount of the deposit required to put a unit on a hard reservation. |
ReservationGroupID | Long |
Description | The ID of the reservation deposit applicable to the unit. |
SerialNumber1 | Long |
Description | Not currently used. |
SerialNumber2 | Long |
Description | Not currently used. |
SiteClassID | Long |
Description | The revenue class to which the unit belongs. |
SoftReservable | Boolean |
Description | Indicates if the unit can be place on a soft reservation (“True”) or not (“False”). |
SquareFeet | Decimal |
Description | The unit’s square footage total. |
Status | UnitStatusValues |
Description | The unit’s status. Available values:
|
StreetRate | Decimal |
Description | The current street rate of the unit. This is the default rate of the unit at time of rental. |
TaxGroupID | Long |
Description | The ID of the tax group assigned to the revenue class of the unit. |
TotalAvailable | Decimal |
Description | The number of units, matching all attributes, that are available to rent. |
UnitCount | Decimal |
Description | The total number of units, matching all attributes, that exist at the site. |
UnitID | Long |
Description | The unit’s ID number. This is maintained through rentals. |
UnitNumber | String |
Description | The unit’s number as assigned by the organization. This is not the UnitID. |
UpdatedDate | DateTime |
Description | The date the unit was last updated. |
Version | Decimal |
Description | The unit’s version number which serves to prevent duplicate use of the unit. |
Volume | Decimal |
Description | The unit’s volume measurement. |
WalkThruOrder | Integer |
Description | The location the unit falls in the walk thru of the site. |
Width | Decimal |
Description | The unit’s width measurement. |
UpdatedBy | Long |
Description | The ID of the store user who last updated the unit. |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a GetUnitDataWithPromos request object and a GetUnitDataWithPromos response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetUnitDataWithPromos_Request request = new SWS.GetUnitDataWithPromos_Request();
SWS.GetUnitDataWithPromos_Response response;
Here’s sample code of the Request object for all available units for a site with the highest priority promotion available for the unit.
// GetUnitDataWithPromos Request
request.SiteID = 123456;
request.Status = new SWS.UnitStatusValues[] { SWS.UnitStatusValues.Available };
request.PromoDataType = SWS.PCDTypeOptions.HighestPriorityPromotion;
Finally we can call the method and pass across the login object and the request object to get our unit data. It’s a good idea to do this in a Try Catch block.
// Call the method that will load the response object
try
{
response = service.GetUnitDataWithPromos(user_request, 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 SWS Methods.
Workflow for Creating a Reservation or Rental
Entities
The following is a flow chart of the main entities involved in creating a rental or reservation in SWS.
An account can have multiple contacts and multiple rentals. A rental must have a primary contact (Contact Type = ACCOUNT_MANAGER) and can have additional secondary contacts. Site rules may require at least one secondary contact as well. A contact that is primary on one rental may be primary, secondary or not related at all to another rental on the account. The account name for personal accounts is the last name, first name of the first contact added to the account. For business accounts an account name should be specified. Each rental will be associated with the unit being rented. The unit has a number assigned by the organization and a primary key known as the UnitID. The two are often confused. If you are displaying information to a tenant you will generally want to use the Unit Number. If you are renting or adjusting a unit in code the unit ID, as the item’s primary key, is generally required.
Finding A Unit and Dynamic Pricing
The first step is displaying the available units. There are multiple options for this: GetSiteUnitData, GetSiteUnitDataV2, GetSiteUnitDataV3, GetUnitData and GetUnitDataWithPromos. GetUnitData returns ALL units in a site along with their pertinent information including ID’s and its version number which will be important when reserving the unit. This method allows a site to customize grouping, pricing and promos to their specifications. It means a little more work, but things will come out exactly how the organization prefers. The only required parameter is the SiteID, the rest of the parameters allow for filtering the results and are all optional. The GetSiteUnitData methods return a single unit based on a pre-set grouping. This grouping takes Width, Depth, Door, Climate, Access Type and Features values into account. For example, if you have ten 5X5 units, half that are climate controlled and half not, you will receive back, IF available, two units, one with climate control and one without. You also have the option to include the best available promotion for each item selected. Again, SiteID is the only required field. There are fewer filter options on this as the items have already been winnowed down. Also failing to indicate a desire for promos will default to false for performance purposes. Both methods return the information necessary to complete a reservation/create a new rental using the MakeReservation method.
Choosing an Account
For a brand new tenant, call CreateNewAccount. This method will create the account and at least one new contact, one new address and one new phone, which will then be available to accept rentals.
If you wish to add a unit to an existing customer’s account, you will need to use the SearchBy method to retrieve their AccountID and then use the AccountID to add the rental to their account.
Making a Reservation/Creating a New Rental
Once you have either created a new account or located an existing account, you can create a reservation/rental. First some terminology regarding reservations and rentals:
- Quote Only – This is created when a person has indicated interest in renting a unit but does not wish to commit to a reservation or rental. An account is still required. This allows for obtaining all the contact information. A unit is still required so anyone following up on the potential sale is aware of what type of rental the customer is looking for. The unit is NOT put on hold and can be rented at anytime by anyone else.
- Soft Reservation – This does not hold a specific unit, but will hold a unit of this type. The reservation will exist until its expiration date or until the reservation is cancelled. If there is only one unit left, it will not show as available to rent due to the soft reservation.
- Hard Reservation – This method holds a specific unit for a site specified length of time. Generally there is also a reservation deposit amount paid, although it is not required. If there is a deposit required, the payment process described below MUST be completed before the reservation process is considered complete. If it is not the rental will be cancelled during our nightly processing.
- Rental – To heck with reservations, the customer has a moving van parked out front. The move in is NOT done, however, until the payment process below has been completed.
MakeReservation does all of the above including upgrading from one status to another. MakeReservation will always return a QuoteID. If a reservation or rental is created there will also be a RentalID returned.
Making a Payment
So you’ve created the account and we’ve made our unit selection now we have to pay for the thing. Making a payment is a three step process.
Step One – GetAssessments – This method retrieves a list of line items to be paid. Regardless if this is a new or existing rental and whether or not you already know the total due this method MUST be called. Assessments may or may not be in existence for the rental. By calling this method it will create any assessments the organization or site requires. Failing to call this process means you may not have the correct total due and will cause errors in payment.
The method will return a list of line items that are due for the requested time-frame. If the tenant has any cash credit/escrow that can be used for payment, they will also be listed here. Note: Cash credit/escrow is not automatically deducted from the total due.
Step Two – GetTotalDue – This step can be skipped if the items in GetAssessments are looped through and totaled. There are some rules to keep in mind for this option. Extended is the total due not including taxes for the assessment, a fulfilled amount indicates some payment has been made on the assessment and that will not be deducted from extended, finally any tax amount must be added in. If a cash credit/escrow is present the extended amount indicates the available balance that can be used toward payment.
Step Three – MakePayment – And you thought we’d never get here. MakePayment accepts the above data, some total data and three payment types. One or any combination of payment types is allowed (i.e., customer wishes to pay half cash, half on a card, or possibly split the payment between two cards, etc.).
But, wait?! They have a promotion for the first month free and GetTotalDue says $0 is due. I don’t have to make a payment…. Yes, you do!!! Any new rental is not moved in until a payment is made. This will push the paid thru date forward and move the tenant in. If no payment is made, even if it’s a $0 cash payment, the rental will be ended as an abandoned rental during nightly processing. They will have to be moved in again, possibly missing out on a day of rent.
The MakePayment method will return a transaction ID if successful. The CashCreditApplied field has been deprecated.
SWS RemovePCD Method
Removes an applied promotion, credit or discount (PCD) from a rental item.
Parameters
Name | DataType | Is Required |
---|---|---|
AssessmentID | Long | Required |
Description | The ID of the assessement that should be removed. This can be retrieved using the GetAssessments method. | |
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. |
Returned Parameters
Name | DataType |
---|---|
Succeeded | Boolean |
Description | Indicates if the PCD was removed from the rental successfully (“True”) or not (“False”). |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a RemovePCD request object and a RemovePCD response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.RemovePCD_Request request = new SWS.RemovePCD_Request();
SWS.RemovePCD_Response response;
Here’s my sample code of the Request object.
// RemovePCD Request
request.SiteID = 123456;
request.AssessmentID = 123456;
Finally we can call the method and pass across the login object and the request object to remove our PCD. It’s a good idea to do this in a Try Catch block.
// Call the method that will load the response object
try
{
response = service.RemovePCD(user_request, 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 SWS Methods.
SWS GetAvailableDiscounts Method
Retrieves a collection of discount data for a specified rental item. This is specific to discounts and promotions, it does not include credits.
Parameters
Name | DataType | Is Required |
---|---|---|
OrgID | Long | Required |
Description | The organization’s ID number. | |
RentalID | Long | Optional* |
Description | The Rental_ID for which to retrieve possible discounts. Use this for existing rentals. This is returned when using the MakeReservation method or can be searched for using the SearchBy method. * Either the Rental_ID or Unit_ID is required. |
|
SiteID | Long | Required |
Description | The site’s ID number. This can be found using the GetSiteList method. | |
UnitID | Long | Optional* |
Description | The unit’s ID number. This is returned when you use any of the GetSiteUnitData calls and is maintained through rentals. * Either the Rental_ID or Unit_ID is required. |
Returned Parameters
Name | DataType |
---|---|
APPL_BEST_PCD | APPL_BEST_PCD |
Description | Returns the object containing the data for the method call. |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a GetAvailableDiscounts request object and a GetAvailableDiscounts response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetAvailableDiscounts_Request request = new SWS.GetAvailableDiscounts_Request();
SWS.GetAvailableDiscounts_Response response;
Here’s my sample code of the Request object.
// GetAvailableDiscounts Request for an available unit
request.OrgID = 123456;
request.SiteID = 123456;
request.UnitID = 123456;
Finally we can call the method and pass across the login object and the request object to retrieve our discounts. It’s a good idea to do this in a Try Catch block.
// Call the method that will load the response object
try
{
response = service.GetAvailableDiscounts(user_request,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 SWS Methods.