SWS UpdateContact Method
Updates a rental contact and returns a copy of the updated record. This method does not update addresses or phone numbers. Use UpdateAddress or UpdatePhone to update that portion of the contact information.
Parameters
Name | DataType | Is Required |
---|---|---|
AcctID | 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. | |
Active | Boolean | Optional |
Description | Sets the contact to active (“True”) or deactivates a contact (“False”). | |
Addresses | ContactAddress | Not used |
Description | The collection of address data. (This data will not be updated in this method. See UpdateAddress to update the contact’s address(es).) | |
Cflex01 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. Max string length of 100. | |
Cflex02 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. Max string length of 100. | |
Cflex03 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. Max string length of 100. | |
Cflex04 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. Max string length of 100. | |
Cflex05 | String | Optional |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. Max string length of 100. | |
ContactId | Long | Required |
Description | The rental contact’s ID number that is being updated. | |
ContactType | ContactType | Optional |
Description | The type of contact to which it will be changed. Available values:
|
|
DLNumber | String | Optional |
Description | The rental contact’s driver’s license number. Max string length of 35. | |
DLState | String | Optional |
Description | The issuing state/province for the drivers license. Max string length of 20. | |
DOB | String | Optional |
Description | The rental contact’s date of birth. The date format is based on your coding software’s parameters. Max string length of 20. | |
EcommCode | String | Optional |
Description | Updates the rental contact’s alpha-numeric eStore password/eCommerce password. Max string length of 30. | |
String | Optional | |
Description | The email address for the account or primary contact. This is also used as a username if the site supports eStore or eCommerce. Max string length of 100. | |
Employer | String | Optional |
Description | The rental contact’s employer. Max string length of 75. | |
FirstName | String | Optional |
Description | The given name for the contact. Max string length of 50. | |
KnownAs | String | Optional |
Description | The alternate or nick name for the rental contact. Max string length of 50. | |
LastName | String | Optional |
Description | The family name for the contact. Max string length of 50. | |
Phones | ContactPhone | Not used. |
Description | The phone number(s) for the contact. (This date will not be updated using this method. See UpdatePhone to update the contacts phone number(s). | |
SSN | String | Optional |
Description | The rental contact’s social security number. Max string length of 20. |
Returned Parameters
Name | DataType |
---|---|
ACCT_CONTACT_ADDRESSES | ACCT_CONTACT_ADDRESSES |
Description | A collection of address data associated with the rental contact. |
ACCT_CONTACT_PHONES | ACCT_CONTACT_PHONES |
Description | A collection of phone data related to the contact. |
ACCT_ID | Long |
Description | The account’s ID number. |
ACTIVE | Boolean |
Description | Indicates if the contact is active (“True”) or not (“False”). |
CFLEX01 | String |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. |
CFLEX02 | String |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. |
CFLEX03 | String |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. |
CFLEX04 | String |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. |
CFLEX05 | String |
Description | A custom field, set up by the organization, designed to hold additional contact information. This is not displayed in the Store application. |
CONTACT_ID | Long |
Description | The rental contact’s ID number. |
CONTACT_TYPE | Integer |
Description | The numeric value for the contact type. Available values:
|
CREATED | DateTime |
Description | The date and time the contact was initially created. |
CREATED_BY | Long |
Description | The user’s ID that initially created the contact. |
DL_NUMBER | String |
Description | The rental contact’s driver’s license number. |
DL_STATE | String |
Description | The issuing state/province for the drivers license. |
DOB | String |
Description | The rental contact’s date of birth. The date format is based on your coding software’s parameters. |
ECOMM_CODE | String |
Description | No longer returned. |
String | |
Description | The email address for the account or primary contact. This is also used as a username if the site supports eStore or eCommerce. |
EMPLOYER | String |
Description | The rental contact’s employer. |
FIRST_NAME | String |
Description | The given name for the contact. |
KNOWN_AS | String |
Description | The alternate or nick name for the rental contact. |
LAST_NAME | String |
Description | The family name for the rental contact. |
SSN | String |
Description | The contact’s masked social security number. |
UPDATED | DateTime |
Description | The date and time that the contact was last updated. |
UPDATED_BY | Long |
Description | The Store user’s ID number that last updated the contact. |
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 Contact request object, and a Contact response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.Contact_Request request = new SWS.Contact_Request();
SWS.Contact_Response response;
Here is a sample code of the request object (including some optional parameters):
// UpdateContact Request
request.AcctID = 123456;
request.ContactId = 123456;
request.Email = "j.doe@a.c";
request.EcommCode = "TestPass";
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.UpdateContact(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.