Archive

Posts Tagged ‘Letters’

SWS GetLetterInfo Method

May 17, 2011 Leave a comment

Retrieves a collection of correspondence data for a specified account or rental. If you want all the letters on the account for all rentals use the AccountID. If you are looking for just a specific rental’s letters use the RentalID.

Parameters

Name DataType Is Required
AccountID Long Optional*
Description The account’s ID number. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method.
*Either the AccountID or RentalID is required.
RentalID Long Optional*
Description The rental’s  ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
*Either the AccountID or RentalID is required.

Returned Parameters

Name DataType
ACCT_ID Long
Description The account’s ID number.
ACTIVE String
Description “Y” if the letter is currently active, “N” if it is not.
ADR_TYPE String
Description The address type information.
Available values:

  • Home
  • Office
  • Mailing
  • Shipping/Delivery
  • Other
CERTIFIED Boolean
Description “True” if the letter is to be sent as certified mail, “False” if not.
CNAME String
Description The first, last and known as names of the primary contact.
CONTACT_ID Long
Description The rental contact’s ID number.
CREATED_BY Long
Description The ID for the user that created the letter.
CREATED_NAME String
Description The name of the person that created the document.
EMAIL Boolean
Description “True” if the letter was sent by email, “False” if not.
EMAIL_TO String
Description The contact’s email address.
EMAIL_STS String
Description Indicates whether the email was sent successfully.
EXPORT_ID Long
Description The batch ID number in which the letter was sent.
GEN_TYPE String
Description Whether the letter was manually generated or automatically generated by the system.
LETTER_ID Long
Description The letter’s ID.
LTR_NAME String
Description The the letter’s name.
LTR_NUM Long
Description The specified full letter ID.
LTR_TYPE String
Description The textual value of the type of letter. (I.E., Invoice)
LTR_TYPE_ID Long
Description The ID of a specific letter. (I.E., LTR_TYPE_ID = 1000, The letter type is an invoice, but 1000 refers to the Store Generic Invoice letter.)
LTR_TYPE_VAL Integer
Description The numeric value of the type of letter. (I.E., 1 = Invoice Type)
MAIL_LOCAL String
Description Whether the mailing was handled through the site or through centralized mail.
MAILED DateTime
Description The date the letter was mailed.
RENTAL_ID Long
Description The rental item’s ID number.
SCHEDULED DateTime
Description The scheduled date the letter is to be sent if different then MAILED.
SENT String
Description Whether the mailing was handled through the site or through centralized mail.
STATUS Boolean
Description Indicates the status of the registered mail letter.
STATUS_VAL String
Description The current delinquency status of the account.
STS_MEANING String
Description The textual meaning of the EMAIL_STS.
UNIT_NUM String
Description The unit’s number as assigned by the organization. This is not the UnitID.
UNIT_NUM_STS String
Description The display name from the search function this includes the unit number and if the account is delinquent or not.
VERSION Integer
Description The version number of the letter if there have been updates.
EMAIL_SENT DateTime
Description The date the email was sent.
PROCESSED_FLAG String
Description Indicates if the letter was processed through centralized processing.
EMAIL_ONLY Boolean
Description Whether the letter is to only be emailed and not sent regular mail.
BARCODE Decimal
Description The barcode number for registered mail.
EMAIL_REG_TYPE Decimal
Description Indicates if the email was sent registered and if so what level of regeistration was used.

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

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

Here’s my sample code of the Request object using the account ID, alternately you can use the rental ID.

// GetLetterInfo Request
request.AccountID = 123456;

Finally we can call the method and pass across the login object and the request object to get our letter info. 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.GetLetterInfo(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.

Categories: API General, Letters Tags:

SWS createAndViewLetter Method

Creates and displays an account letter (i.e., Lien Sale Notice, Welcome Letter, etc).

Parameters

Name DataType Is Required
LtrData swsLtrParams Required
Description The object containing all required and optional parameters to create the letter.

Returned Parameters

Name DataType
createAndViewLetterResult String
Description The URL where the letter is located.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects.  We will need the standard service object, a CreateAndViewLetter request object, and a CreateAndViewLetter response object. We can define and create those like this:

// Create request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.createOrViewLtr_Request request = new SWS.createOrViewLtr_Request();
SWS.PdfFilePath_Response response;

Here’s my sample code of the Request object.

// Letter link request
request.LtrData.siteId = 123456;
request.LtrData.acctId = 123456;
request.LtrData.unitNum = "A102";
request.LtrData.ltrTypeId = 123456;
request.LtrData.siteLtrRule = SWS.siteRuleLtrTypeGrpVals.RATECHANGE;
request.LtrData.isMailLocal = true;
request.LtrData.isCOM = false;
request.LtrData.certifiedType = SWS.certifiedVals.NONE;
request.LtrData.contactType = SWS.contactTypeVals.PRIMARY;
request.LtrData.contactOrAddrId = 123456;

Finally we can call the method and pass across the login object and the request object to retrieve our requested information. 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.createAndViewLetter(user_request, request);
}
catch (Exception ex)
{
   MessageBox.Show(ex.Message);
}

Here is what a returned path might look like:

https://csiapp1.centershift.com/qa40/letters/1000085746_1304609631.pdf

Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.

For a full list of methods see SWS Methods.

SWS createLetter Method

Creates a .pdf letter from an existing letter template in Store.

Parameters

Name DataType Is Required
Request swsLtrParams Required
Description The fields required to create the letter.

Returned Parameters

Name DataType
LtrNum Long
Description Returns the letter number assigned to the specific letter and customer.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects.  We will need the standard service object, a CreateLetter request object, and a CreateLetter response object. We can define and create those like this:

' Create a request and response objects
 Dim objService As New SWS.WSSoapClient
 Dim objReq As New SWS.CreateLetter_Request
 Dim objRes As New SWS.CreateLetter_Response

As with every method we need to pass in credentials. We do this with the LookupUser request object:

Here is a sample code of the request object:

' CreateLetter Request
 With objReq
 .SiteID = 1000000001
 .AcctID = 1111111111
 .RentalID = 1212121212
 .LtrTypeID = 1000
 .SiteLtrRule = INVOICE
 .IsMailLocal = True
 .IsCOM = False
 .CertifiedType = NONE
 .ContactType = PRIMARY
 .ContactOrAddrID = 2222222222
 End With

 

Finally we can call the method and pass across the login object and the request object to retrieve our requested information. It’s a good idea to do this in a Try Catch block.

Try
 ' Call the method that will load the response object
 objRes = objService.CreateLetter(objLogin, objReq)
 Catch ex As Exception
 MessageBox.Show(ex.Message)
 End Try

Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.

For a full list of methods see SWS Methods.

Categories: API General, Doc Designer, Letters Tags:

SWS scheduledLetter Method

Creates a letter and allows you to choose the date that it will be generated in Store.

Parameters

Name DataType Is Required
AcctID Long Required
Description The account’s ID number for which to generate the letter. This is returned when you use the CreateNewAccount method or can be retrieved with the SearchBy method.
CertificateOfMail Boolean Required
Description Adds a filter for letters that will be generated with a certificate of mail (“True”) or not (“False”). This does not indicate certified mail. See the USPS website for details.
CertifiedType certifiedVals Required
Description Indicates what type of certified mail is to be used in the mailing of the letter.
Available values:

  • NONE
  • CERT_NO_RECEIPT
  • CERT_WITH_RECEIPT
MailLocal Boolean Required
Description Adds a filter to retrieve letters that will be printed and mailed by the site (“True”) or letters that will be sent through centralized mailing (“False”).
PdfTemplateID Long Required
Description The ID of the template that will be used to generate the letter.
RentalID Long Optional
Description The rental item’s ID number for which to generate the letter. If the letter is account level letter this is not required. If the letter is a rental level letter it is required. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
ScheduledDate DateTime Required
Description The date you wish to schedule the letter to be generated.
SendTo LTR_CONTACT_TYPES Required
Description Indicates which contacts will receive the letter.
Available values:

  • PRIMARY
  • SECONDARY
  • BOTH
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.

Returned Parameters

Name DataType
ScheduledID Long
Description The ID for the newly scheduled letter.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects.  We will need the standard service object, a scheduledLetter request object, and a scheduledLetter response object. We can define and create those like this:

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

Here’s my sample code of the Request object.

// scheduledLetter Request
request.SiteID = 123456;
request.AcctID = 123456;
request.RentalID = 123456;
request.PdfTemplateID = 123465;
request.ScheduledDate = new DateTime(2017, 9, 1);
request.SendTo = SWS.LTR_CONTACT_TYPES.PRIMARY;
request.MailLocal = true;
request.CertificateOfMail = false;
request.CertifiedType = SWS.certifiedVals.NONE;

Finally we can call the method and pass across the login object and the request object to retrieve our requested information. 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.scheduledLetter(user_request, request);
}
catch (Exception ex)
{
  MessageBox.Show(ex.Message);
}

Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.

For a full list of methods see SWS Methods.

Categories: Letters Tags: