TOP

UpsertContact()

Part Of: Contact Webservice 3.04

WSDL:

https://webservices.vin65.com/V304/ContactService.cfc?wsdl

Australian URL:

https://webservices.aus.vin65.com/V304/ContactService.cfc?wsdl

Description:

Use the UpsertContact() function to upsert an array of contacts. Required fields are indicated by a '*'

Parameters:

Attribute Data Type Default Description
ContactID UUID Auto-generated if contact doesn't exist by "AltContactID" or "Email" UUID of the WineDirect Contact
AltContactID String 50   A string reference to the contact in your system. Setting this will allow future updates to occur using your AltContactID instead of the WineDirect "ContactID".
FirstName String 50   The first name of the customer.
LastName String 50   The last name of the customer.
Title String 50   The customer's title.
Company String 255   The customer's business or company. 

Address

String 255   The street address of the customer. 
Address2 String 255   Additional address information. For example, unit #, apt #, etc. 
City String 50   The customer's city of residence.
StateCode String 50   The two character abbreviated state code or province code. For example, California = CA, British Columbia = BC. Australia state codes, South Australia = SA, Victoria = VIC etc. 
CountryCode String 50   This is a standard two letter country code, default is “US”.
ZipCode String 50   The customer's zip code or Postal Code. 
MainPhone String 50   The customer's main phone number. Format is in: 000-000-0000
Email String 100   When upserting customers, email is used to match existing records if no other IDs are passed in.
Username String 100   Usernames must be unique and greater than 6 characters. Required if "Password" is passed in.
Password String 255   Passwords must be greater than 6 characters. Required if "Username" is passed in.
Birthdate Date   Formatted as a YYYY-MM-DD
PriceLevel String 50   The name of a price level that must already exist in the WineDirect platform. If it exists, the contact will have that price level assigned. If it does not exist, you will get an error.
IsNonTaxable Boolean False Set this to true for contacts that are not required to pay tax. Tax calculations will use this flag to make them exempt if appropriate. Default is false.
WholesaleNumber String 50  

The Wholesale number of the customer.

PaymentTerms String 50   Enumerated type that is either blank (default), “Net 10”, “Net 30”, or “Upon Receipt”.
FacebookProfileID String 50   Used to store a Facebook ID for Facebook related services in the WineDirect platform.
CreditCardType String 50  

If it exists, this will overwrite the primary credit card.

Must be one of the following values: 
MasterCard,Visa,AmericanExpress,Diners,Discover,JCB

CreditCardNumber String 255  

If it exists, this will overwrite the primary credit card.

Must match the format of the passed in "CreditCardType".

.CreditCardExpirationMonth Integer  

If it exists, this will overwrite the primary credit card.

Must be a valid integer between 1 and 12.

CreditCardExpirationYear Integer  

If it exists, this will overwrite the primary credit card.

Must be a valid 4 digit year.

CreditCardNameOnCard String 255  

If it exists, this will overwrite the primary credit card.

Name that appears on the Credit Card.

IsSingleOptIn Boolean False Set this to true for customers who have requested to opt into a mailing list. This will set their email status to "Single Opt In", and will send them an "Email Verification" email which contains a link to Double Opt In. Default is false.

Sample Request:

<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
<soap:Body>
  <UpsertContact>
    <Request>
      <Security>
        <Username>//Your Usernam e//</Username>
        <Password>//Your Password//</Password>
      </Security>
      <Contacts>
        <Contact>
          <Firstname>Michael</Firstname>
          <Lastname>Hersch</Lastname>
          <Email>michael.hersch@winedirect.com</Email>
        </Contact>
        <Contact>
          <Email>invalidemail</Email>
        </Contact>
      </Contacts>
    </Request>
  </UpsertContact>
</soap:Body> 
</soap:Envelope> 

Sample Response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <UpsertContactResponse>
      <UpsertContactReturn>
        <ContactResults>
          <ContactResults>
            <Contact>
              <Address></Address>
              <Address2></Address2>
              <AltContactID></AltContactID>
              <Birthdate />
              <City></City>
              <Company></Company>
              <ContactID>5897B83E-EC54-1187-9214-72B17F0ED71C</ContactID>
              <CountryCode></CountryCode>
              <CreditCardExpirationMonth />
              <CreditCardExpirationYear />
              <CreditCardNameOnCard />
              <CreditCardNumber />
              <CreditCardType />
              <CustomerNumber>22796</CustomerNumber>
              <DateAdded>2019-07-24T21:28:08.297Z</DateAdded>
              <DateModified>2019-07-24T21:28:08.297Z</DateModified>
              <Email>michael.hersch@winedirect.com</Email>
              <FacebookProfileID></FacebookProfileID>
              <Firstname>Michael</Firstname>
              <IsNonTaxable>false</IsNonTaxable>
              <IsSingleOptIn />
              <LastLoginDate />
              <Lastname>Hersch</Lastname>
              <MainPhone></MainPhone>
              <Password />
              <PaymentTerms></PaymentTerms>
              <PriceLevel></PriceLevel>
              <StateCode></StateCode>
              <Title></Title>
              <Username></Username>
              <WholesaleNumber></WholesaleNumber>
              <ZipCode></ZipCode>
            </Contact>
            <Errors />
            <IsSuccessful>true</IsSuccessful>
          </ContactResults>
          <ContactResults>
            <Contact />
            <Errors>
              <Errors>
                <ErrorCode>InvalidEmailFormat</ErrorCode>
                <ErrorMessage>Email must be valid.</ErrorMessage>
              </Errors>
            </Errors>
            <IsSuccessful>false</IsSuccessful>
          </ContactResults>
        </ContactResults>
        <Errors>
          <Errors>
            <ErrorCode>InvalidContact</ErrorCode>
            <ErrorMessage>1 contact(s) failed to upsert. View 'ContactResults' for more details.</ErrorMessage>
          </Errors>
        </Errors>
        <IsSuccessful>false</IsSuccessful>
        <RecordCount>1.0</RecordCount>
      </UpsertContactReturn>
    </UpsertContactResponse>
  </soapenv:Body>
</soapenv:Envelope>

Page Top