Home > API General, Rental/Reservation, Search > SWS LocateSimilarQuotes Method

SWS LocateSimilarQuotes Method


Retrieves a list of quotes similar to an existing quote. This is used to monitor rentals that were created separately from their original quote, allowing a 3rd party to get credit for bringing in the customer.

Parameters

Name DataType Is Required
OrgID Long Required
Description The organization’s ID number.
QuoteID Long Required
Description The quote’s ID number. This is returned when creating a reservation using MakeReservation.

Returned Parameters

Name DataType
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.
ATTRIBUTE01 Integer
Description The numeric value for the “Attribute01” custom look up as defined by the site.
CONTACT_ADDRESS String
Description The contact’s address.
CREATED_BY Long
Description The Store user’s ID that created the record.
DISCOUNT_AMOUNT_OFFERED Integer
Description The PCD offered with the quote.
EMAIL String
Description The email address for the account or primary contact.
FIRST_NAME String
Description The given name for the account/rental contact.
LAST_NAME String
Description The family name for the rental contact.
MARKET_CODE_VAL String
Description The market code value.
ORG_ID Long
Description The organization’s ID number.
PHONE String
Description The contact’s phone number.
QUOTE_ID Long
Description The quote’s ID number.
QUOTE_SOURCE String
Description The available inquiry source for how customers contacted the site.
QUOTE_START_DATE DateTime
Description The date the quote record was created.
QUOTE_STATUS_VAL Integer
Description The numeric value of the quote status.
Available values:

  • 1 – Open
  • 2 – Confirmed
  • 3 – Expired
  • 4 – Cancelled
  • 5 – Rented
  • 6 – In-Process
QUOTE_TYPE String
Description The quote’s type.
Available values:

  • Quote
  • Soft Reservation
  • Hard Reservation
QUOTE_TYPE_VAL Integer
Description The quote type’s numeric value.
Available values:

  • 1 – Quote
  • 2 – Soft Reservation
  • 3 – Hard Reservation
QUOTED_RATE Integer
Description The quoted rate for the potential rental item.
SITE_ID Long
Description The site’s ID number.
SITE_NAME String
Description The site’s name where the rental is located.
STATUS String
Description The textual value of the quote status.
Available values:

  • Open
  • Confirmed
  • Expired
  • Cancelled
  • Rented
  • In-Process
UNIT_DIMENSIONS String
Description The dimensions for the rental item.
UNIT_NUMBER String
Description The unit’s number as assigned by the organization. This is not the UnitID.
UNIT_STATUS_VAL String
Description The current status of the unit for which the quote record applies.
Available values:

  • Available
  • Reserved
  • Rented
  • Company Use
  • Unavailable – Damaged
  • Unavailable – Permanent
  • Virtual/Linked Units (Not currently used.)
  • Other
  • Unavailable – Pending
  • Available – Hold
USER_NAME String
Description The email address of the contact.
EXPIRATION DateTime
Description The date the quote record ends.

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 a LocateSimilarQuotes request object and a LocateSimilarQuotes response object. We can define and create those like this:

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.LocateSimilarQuotes_Request request = new SWS.LocateSimilarQuotes_Request();
SWS.LocateSimilarQuotes_Response response;

Here’s my sample code of the Request object.

//  LocateSimilarQuotes Request
request.OrgID = 123456;
request.QuoteID = 123456;

Finally we can call the method and pass across the login object and the request object to get our void fee stats. 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.LocateSimilarQuotes(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.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s