Follow CDYNE Blog on WordPress.com
Header Image -

Tag Archives

19 Articles

Deliver Relevant Communications to Customers and Clients

CDYNE Phone Notify! API is an automated API phone notification system that allows IT departments to build voice applications to deliver relevant communications to customers and clients.  It has the ability to send or receive up to 5,000 tier-1 quality phone calls per minute using text to speech (TTS) in multiple languages, recorded files, or both. With over 50 programming methods, you can build powerful applications that will handle complex phone scripts, send immediate or scheduled phone calls, respond to call actions in real time, and manage call lists. Phone Notify! allows programmers to send automated phone alerts, conduct phone surveys, perform conference calls, and integrate custom business applications into their existing system.

AN OVERVIEW

There are over 50 Phone Notify! programming operations available to build and integrate voice applications into your system. They can be categorized into the list shown below. Additionally, a detailed operation list by category may be found here.

  • Send and Receive Phone Calls
  • Status Report Management
  • Script Management
  • Sound File Management
  • List Management

 

TUTORIALS & SCRIPTING SAMPLES

Tutorials 1 and 2 use C# in Visual Studio 2010. You may find additional source code examples and download code examples from the Phone Notify! developer’s wiki. The script samples show advance scripting features that are available with Phone Notify! API.

Build an appointment reminder using NotifyPhoneBasic and RecordSoundViaPhoneCall methods

Integrate conference calls using NotifyPhoneAdvanced, SetIncomingCallScript, and CancelConference methods

An advanced scripting example for automated phone reminders

Additional scripting examples for a political poll, school announcement, registration confirmation, survey, and recording sound files may be found on the CDYNE developer’s wiki.

For more information about CDYNE Phone Notify! API, please contact an account representative at 1-800-984-3710, inquire by email, or initiate a chat for more details.

Or sign up for a free trial license key to test CDYNE Phone Notify! API.

Developers find CDYNE Phone Notify! API integration details on the CDYNE developer’s wiki.

1 view

Phone Notify! Programming Methods

This is a tutorial on how to program the PAV API avoid invalid or incorrect address entries.

This simple web form that was created using Visual Studio’s C# ASP.NET Web Forms Application to verify an address before completing an entry to the database.

address-input

This is how it was programmed:

 

This section of code is simply for aesthetics and will be what the end user’s see when completing the form.

Once you have created a new project within Visual Studio, you will need to add the API WSDL (http://pav3.cdyne.com/PavService.svc?wsdl) the project as a service reference. Once it has been added you would then need to include it in the very top section of the “Default.aspx.cs” page as shown below in the highlight yellow box. In our case we have named the project “VerifyAddress” and given the service reference the name of “WSDL”.

service reference

After the service reference has been added, we then navigate to the “Default.aspx” page within the project and add the necessary text boxes and button.


Now that the textboxes and button have been created, the portion of code below is added to the “Default.aspx.cs” page.  The API request code is contained within the “Submit” button click event.  All information passed along within the request with the exception of the parameter :”Urbanization” (which is used for address within Puerto Rico only) and the API license key are passed from the textboxes to the request code once an end user presses “Submit”.

After the address has been submitted, the end user would receive an alert box notating if there was an error verifying the address and if so, the error is explained and the user is asked to re-enter the address.  If no errors occur and the address verifies successfully (CDYNE ReturnCode of 100, 101, 102, or 200) the end user receives an alert box stating their order has been successfully submitted.

Once the “OK” button is pressed on the alert box, the textboxes on the form then display the text as it was shown when the page was first loaded and another address can be verified.

0 views

Building an Appointment Reminder with CDYNE Phone Notify! Web Service

Phone Notify! Web Service supports 50 operations to build customizable and scalable voice applications. It’s designed to enable any business application to send or receive up to 5,000 tier-1 quality phone calls per minute using text to speech, recorded files, or both. This article will take a look at 2 operations to build a basic voice application that will use text to speech and a recorded sound file to send out an appointment reminder.

This tutorial uses  C# in Visual Studio 2010. You can find additional source code examples and download code examples from the Phone Notify! developer’s wiki.

Phone Notify! Operations Used

Step 1: Consuming Phone Notify! Web Service

  • Open a new or existing project in Visual Studio 2010
  • From the top tool bar, go to Project>Add Service Reference, which will open up the following screen:

  • Click on the Advanced button in the lower left-hand corner, which will open up another screen:

  • Click on the Add Web Reference button, which will open up a third screen:

  • Add the Phone Notify WSDL URL: http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx?wsdl to the URL box, and click on the green arrow. This will pull up the Phone Notify! Web Service Description as shown in the next screen:
  • Name the web reference. In this case, we named it WSDL. Then click the Add Reference button.

Step 2: Setting Up a Basic Notify

The example below shows the code used to send a Basic Notify using the NotifyPhoneBasic method.

A few notes about using the NotifyPhoneBasic method:

  • This method will call any phone number in the US/Canada and read the TextToSay to that phone number
  • PhoneNumberToDial and CallerID must be filled in (they can be in any format as long as there is 10 digits)

When the program below is run with a license key, CDYNE Corporation will call 3215554757 with a text to speech message stating, “John Williams has an appointment with Dr. Smith on Tuesday, May 13 at 3pm.” The strings written in red in the screenshot is made up of the following components:

  • Phone number to dial – “3215554757”
  • Script –  “John Williams has an appointment with Dr. Smith on Tuesday, May 13 at 3pm.”
  • Caller ID – “7575449510”
  • Caller ID Name – “CDYNE Corporation.”
  • Voice ID – “4”
  • License Key – this is required to send or receive phone calls with Phone Notify! Web Service.

This notify uses voice ID 4, named Callie, and represents a US English female voice, age 30.You can invoke all voices available with Phone Notify! with the getVoices method. You may also listen to the voices at http://cepstral.com/demos/. Please note that the Cepstral website may contain voices not currently available with the Phone Notify! Web Service.

WSDL.PhoneNotify pn = new WSDL.PhoneNotify();

WSDL.NotifyReturn nr = pn.NotifyPhoneBasic(“3215554757”,

“John Williams has an appointment with Dr. Smith on Tuesday, May 13 at 3pm.”,

“17575449510”, “CDYNE Corporation”, “4”, “LicenseKey”);

Step 3: Request a Phone Call to Record a Sound File

One way to make automated phone reminders more personal is to use a recorded voice. Although text to speech can be very useful in some applications, it is a mechanical and impersonal sounding messaging tool for some customer interactions. In this step, we will use the RecordSoundViaPhoneCall method to call a designated phone number and record a sound file. The sound file recording states, “has an appointment with Dr. Smith on,” and leaves out the customer’s name, and the date and time of the appointment. These three values will remain as text to speech when we put the script together in Step 4.

A few notes about the RecordSoundViaPhoneCall method:

  • SoundfileIDs can only be lowercase and contain normal file characters
  • The CallerIDName will be the SoundFileID
  • The CallerID will be an 800 or 866 number

When this program is run with a license key, the phone number designated in the code (3215554757) will receive a phone call with instructions to record sound file “smith1.” Once recorded, the file will play back and the user has the option to accept or rerecord the message. We’ll access this file in the next step.

WSDL.PhoneNotify pn = new WSDL.PhoneNotify();

WSDL.RecordSoundViaPhoneCall(“3215554757”, “smith1”, “LicenseKey”);

Step 4: Putting Together the Script

In the final step, we’ll use the NotifyPhoneBasic method to combine the text to speech and recorded file, which we named smith1.

When the program below is run with a license key, CDYNE Corporation will call 3215554757 with a recorded message combined with text to speech variables. The variables include, “John Williams” and “Tuesday, May 13 at 3pm.”

WSDL.PhoneNotify pn = new WSDL.PhoneNotify();

WSDL.NotifyReturn nr = WSDL.NotifyPhoneBasic(“3215554757”,

“John Williams ~^smith1~ Tuesday, May 13 at 3pm.”,

“17575449510”, “CDYNE Corporation”, “4”, ” LicenseKey”);

For more information about CDYNE Phone Notify! API, please contact an account representative at 1-800-984-3710, inquire by email, or initiate a chat for more details.

Or sign up for a free trial license key to test CDYNE Phone Notify! API.

Developers find CDYNE Phone Notify! API integration details on the CDYNE developer’s wiki.

0 views

Part 5: CDYNE Postal Address Verification DPV Code Suggestions

CDYNE Postal Address Verification API returns USPS mailing industry information that can be useful for interacting with address verification at point of entry. In the chart below, the first two columns outline the values returned when using the VerifyAddressAdvanced method.
For example, inputting the address “2125 smith ave, chesapeake, va” will return the following mailing industry values:
  • DpvConfirmationIndicator: D
  • DpvFootnote1: AA
  • DpvFootnote2: N1
Comparing D AA N1 to the chart below may prompt a suggested interaction of, “Verify secondary information, it is not present.” In other words, the suite number is missing. Depending on the data entry scenario, you can generate an error pop-up to ask for the secondary address information, or flag the address for future processing or validation.

DPV Return Code

Footnote

Suggested Interaction


N

AA

Verify the address
. The address validated on the CASS certified software engine but cannot be validated in the DPV process.

N

AA M1

Verify the Primary Number, it is not present. The address validated on the CASS certified software engine, but cannot be validated in the DPV process

N

AA M3

Verify the Primary Number
, It is present but not valid. The address validated on the CASS certified software engine, but cannot be validated in the DPV process.

N

AA P1

Verify the box number
, it is not present for this RR or HC address but needed to confirm in the DPV process.

N

AA P3

Verify the box number
, it is present for this PO Box, RR or HC address but cannot be confirmed in the DPV process.

Y

AA BB

No action needed
, the address validated to all components.

Y

AA RR

No action needed
, the address validated. It has been found in the CMRA table with PMB information present.

Y

AA R1

The address validated
. It has been found in the CMRA table without PMB information.

Y

AA F1

No action needed.

Y

AA G1

No action needed.

Y

AA U1

No action needed.

S

AA CC

Verify secondary information
, it is present but cannot be confirmed in the DPV process.

S

AA P3

Verify the box number
, it is present for this PO Box, RR or HC address but cannot be confirmed in the DPV process.

S

AA CC RR

Verify secondary information
, it is present but cannot be confirmed in the DPV process. It has been found in the CMRA table with PMB info present.

S

AA CC R1

Verify secondary information
, it is present but cannot be confirmed in the DPV process. It has been found in the CMRA table without PMB information and is not required for USPS delivery.

D

AA P1

Verify the box number
, it is not present for this RR or HC address but needed to confirm in the DPV process.

D

AA N1

Verify secondary information
, it is not present.

D

AA N1 RR

Verify secondary information
, it is not present. It has been found in the CMRA table with PMB information present.

D

AA N1 R1

Verify secondary information
, it has been found in the CMRA table without PMB information and is not required for USPS delivery.

Blank

A1 M1

Get correct address
, this address cannot be found in CASS certified software engine so it is not presented to the DPV process.

Blank

A1 M3

Get correct address
, this address cannot be found in CASS certified software engine so it is not presented to the DPV process.

Blank

A1

Get correct address
, this address cannot be found in CASS certified software engine so it is not presented to the DPV process.
You can read the rest of the blog series by accessing the links below:

For more information about CDYNE Postal Address Verification, please contact an account representative at 1-800-984-3710, inquire by email, or initiate a chat for more details.

Or sign up for a free trial license key to test CDYNE Postal Address Verification.

20 views

Part 3: CDYNE Postal Address Verification VerifyAddress Operation

CDYNE Postal Address Verification VerifyAddress programming method is the barebones Web Service call for users who only need to validate whether or not an address is deliverable. The address deliverability status is returned through the DPV Return Code system, which indicates the parts of the address that are incorrect, and will return corrected information on file with the USPS. This article will take you through three address input and output examples to display some of the important features that the VerifyAddress operation offers.

Example 1: A Correct Address is Confirmed Deliverable

Let’s begin with a correct address and run it through the VerifyAddress Operation. The left hand column shows the input address and the license key. The right hand column displays the corrected address and return code that is sent back by CDYNE Postal Address Verification. There are several differences that immediately jump out between the input and output columns:

  • Lowercase letters were changed to all caps
  • The secondary address line input value of 200 was appended to the primary address line in the output as “STE 200”
  • The zip + 4 value of “23320-2518” was appended
  • A code of “100” was returned

 


VerifyAddress Input


VerifyAddress Output


Firm: Cdyne

Primary Address Line: 2125 smith ave

Secondary Address Line: 200

City: chesapeake

State: va

Zip: 23320


Firm: CDYNE

Primary Address Line: 2125 SMITH AVE STE 200

Secondary Address Line: 200

City: CHESAPEAKE

State: VA

Zip: 23320-2518


Additional Input


Additional Output


License Key: F01d55fd-5155-5455-5585-e84ab8de5555


Return Code: 100

Although the USPS does not require all capital letters the USPS prefers all caps or uppercase for ease of automatic scanning and application of bar codes. With the VerifyAddress method, address data is returned in all caps. You can use VerifyAddressAdvanced operation to return addresses in proper case.

The USPS preferred location of the secondary address unit designators (i.e. APT, STE, BLDG) is at the end of the delivery address line. In the example above, CDYNE Postal Address Verification correctly moved “200” to the end of the primary address line, and appended the correct designator of “STE.”

The zip + 4 determines a more precise location than the five-digit zip code alone. The zip + 4 includes the five-digit zip code, a hyphen, and four-digits at the end (i.e. 23320-2518).

The return code of 100 means all parts of the address are confirmed as deliverable. DPV is a USPS validation process that confirms the existence of a specific address (down to the apartment or suite number) and whether or not it is a valid destination for a mailing or package.

CDYNE Postal Address Verification DPV Return Codes:

  • 10 – Input address is not found
  • 100 – Input address is DPV confirmed for all components
  • 101 – Input address is found, but not DPV confirmed
  • 102 – Input address primary number is DPV confirmed – Secondary number is present but not DPV confirmed
  • 103 – Input address primary number is DPV confirmed – Secondary number is missing
  • 200 – Canadian address on input. Verified on city level only

 

Example 2: Providing Minimal Input Field Information

The minimum address field requirements for CDYNE Postal Address verification to validate an address are one of two combinations:

  • Primary address line/city/state
  • Primary address line/zip code

In the example below, entering the primary address line, city, and state returns a standardized and corrected address, but the return code in this instance is 103. This means the input address primary number is DPV confirmed, and the secondary number is missing. In other words, there is supposed to be a suite or apartment number, but that information cannot be determined with the input data. This is an opportunity to interact with the data entry in real time, or flag the address in the database for further evaluation.


VerifyAddress Input


VerifyAddress Output


Firm:

Primary Address Line: 2125 smith ave

Secondary Address Line:

City: chesapeake

State: va

Zip:


Firm:

Primary Address Line: 2125 SMITH AVE

Secondary Address Line:

City: CHESAPEAKE

State: VA

Zip: 23320-2518


Additional Input


Additional Output


License Key: F01d55fd-5155-5455-5585-e84ab8de5555


Return Code: 103

In the second example, entering the primary address line and zip code also returns a standardized and corrected address with a return code of 103.


VerifyAddress Input


VerifyAddress Output


Firm:

Primary Address Line: 2125 smith ave

Secondary Address Line:

City:

State:

Zip: 23320


Firm:

Primary Address Line: 2125 SMITH AVE

Secondary Address Line:

City: CHESAPEAKE

State: VA

Zip: 23320-2518


Additional Input


Additional Output


License Key: F01d55fd-5155-5455-5585-e84ab8de5555


Return Code: 103

Example 3: Utilizing the Firm Name or Recipient Input Field

CDYNE Postal Address Verification utilizes the USPS SuiteLink database to provide improved business addressing information by appending known secondary (suite) information to business addresses. In the example below, CDYNE Postal Address Verification appended “STE 200″ to the original address because it matched the firm name, “CDYNE” to “STE 200″ in the USPS database. Notice that the input address does not contain a secondary or suite number, but the corrected address does.


VerifyAddress Input


VerifyAddress Output


Firm: CDYNE

Primary Address Line: 2125 smith ave

Secondary Address Line:

City: Chesapeake

State: VA

Zip:


Firm: CDYNE

Primary Address Line: 2125 SMITH AVE STE 200

Secondary Address Line:

City: CHESAPEAKE

State: VA

Zip: 23320-2518


Additional Input


Additional Output


License Key: F01d55fd-5155-5455-5585-e84ab8de5555


Return Code: 100

You can read the rest of the blog series by accessing the links below:

Part 1: CDYNE Postal Address Verification API Overview

Part 2: CDYNE Postal Address Verification API Operations Overview

Part 4: CDYNE Postal Address Verification VerifyAddressAdvanced Operation

Part 5: CDYNE Postal Address Verification DPV Code Suggestions

For more information about CDYNE Postal Address Verification, please contact an account representative at 1-800-984-3710, inquire by email, or initiate a chat for more details.

Or sign up for a free trial license key to test CDYNE Postal Address Verification.

2 views

Part 2: CDYNE Postal Address Verification API Operations Overview

CDYNE Postal Address Verification API offers nine programming operations that deliver address data verification and data returns in a variety of ways. Each operation specializes in a specific set of data returns so businesses can select only the address information they need from a wider range of options. The following is a summary of each operation with an example of how each one can be used.

VerifyAddress Operation

This programming operation is the barebones Web Service call for users who only need to validate whether or not an address is deliverable.  Address deliverability status is returned through the DPV Return Code system, which indicates the parts of the address that are incorrect, and will return corrected information on file with the USPS. In the example below, the left column shows the address sent to CDYNE Postal Address Verification (along with the required license key). The right column shows the corrected address. It has been standardized in all caps, the suite designator has been corrected to “STE,” and the zip+4 number “2518” has been appended to the five-digit zip code. Most importantly, CDYNE Postal Address Verification returns the code 100. This means all parts of the address are confirmed as deliverable (see DPV Return Codes below the example).  DPV is a USPS validation process that confirms the existence of a specific address (down to the apartment or suite number) and whether or not it is a valid destination for a mailing or package.

Additionally, CDYNE Postal Address Verification will return the county, country, and return code data. The return code designates the status of the Delivery Point Validation (DPV) information on file with the USPS.

CDYNE Postal Address Verification DPV Return Codes:

  • 10 – Input address is not found
  • 100 – Input address is DPV confirmed for all components
  • 101 – Input address is found, but not DPV confirmed
  • 102 – Input address primary number is DPV confirmed – Secondary number is present but not DPV confirmed
  • 103 – Input address primary number is DPV confirmed – Secondary number is missing
  • 200 – Canadian address on input. Verified on city level only

To see examples of addresses with return codes, see Part 3: CDYNE Postal Address Verification VerifyAddress Operation.

VerifyAddressAdvanced Operation

In addition to validating whether an address is deliverable, this programming operation returns a host of optional information at no extra charge including geolocation, legislative, census, and mailing industry information. These options can be turned on with a true value within the web service call (the default value is set to false). In the example below, census, geo location, legislative, mailing industry, and residential delivery indicators were set to true. The advantage of the VerifyAddressAdvanced Operation is the ability to customize the data return according to your business needs.

The example above does not show all of the data available for return. Please see Part 4: CDYNE Postal Address Verification VerifyAddressAdvanced Operation which details the complete features and capabilities of this programming method.

GetIntelligentMailBarcode

CDYNE Postal Address Verification API can be used to obtain an Intelligent Mail Barcode string to generate a barcode for mail discounts. The first step is to run an address through the VerifyAddressAdvanced operation, which will return the Intelligent Mail Barcode Key as shown in the example below.

Once the Intelligent Mail Barcode Key is obtained, the second step is to run the GetIntelligentMailBarcode operation. There are six required input values, and they are defined as the following:

  • Barcode Identifier — a two-digit number assigned by the USPS to encode the presort identification
  • Service Type Identifier — a three-digit number assigned by the USPS for any combination of services requested on the mailpiece
  • Mailer Identifier — a unique six or nine-digit number assigned by the USPS that identifies a business entity
  • Serial Number — a six or nine-digit number assigned by the mailer for uniquely identifying and tracking mailpieces
  • Intelligent Mail Barcode Key — the data string returned by CDYNE Postal Address Verification VerifyAddressAdvanced operation
  • License Key — a unique data string assigned by CDYNE Corporation to run Postal Address Verification transactions

The string data in the Intelligent Mail Barcode return can be used to generate barcodes for postal mailing discounts.

CDYNE Postal Address Verification GetIntelligentMailBarcode Return Codes:

  • 0 – Success
  • 1 – Invalid input

 

GetZipCodesWithinDistance

This operation returns all zip codes within the radius of a designated latitude and longitude. In the example below, the latitude/longitude and a radius of 1 mile returns five zip codes for that geolocation. The GetZipCodesWithinDistance operation also includes a return code of “0” which means “success.” The return codes for the GetZipCodesWithinDistance operation are listed below.

CDYNE Postal Address Verification GetZipCodesWithinDistance Return Codes:

  • 0 – Success
  • 1 – Invalid input
  • 2 – Invalid license key
  • 3 – Returned zero zip codes
  • 4 – Outside of the latitude and longitude range

 

GetZipCodesForCityAndState

The GetZipCodesForCityAndState programming operation returns all zip codes associated with the city name and state provided at input. The example below returns nine zip codes for Chesapeake, VA, with a return code of “0” or successful. The return codes for the GetZipCodesForCityAndState operation are listed below.

CDYNE Postal Address Verification GetZipCodesForCityAndState Return Codes:

  • 0 – Success
  • 1 – Invalid input
  • 2 – Invalid license key
  • 3 – No match

 

GetZipCodesForFips

Federal Information Processing Standard or FIPS are standards developed by the U.S. government for use in computer systems by all non-military government agencies and government contractors. The U.S. Census Bureau uses FIPS codes to identify legal and statistical entities including states and counties. By inputting the FIPS code value, you can obtain the associated zip codes as shown in the example below.

If you do not have the FIPS value, one way to obtain is through the VerifyAddressAdvanced method. Here is an example:

CDYNE Postal Address Verification GetZipCodesForFips Return Codes:

  • 0 – Success
  • 1 – Invalid input
  • 2 – Invalid license key
  • 3 – Returned zero zip codes

 

GetCongressionalDistrictByZip

This operation returns the congressional district associated with the zip code provided at input.

CDYNE Postal Address Verification GetCongressionalDistrictByZip Return Codes:

  • 0 – Success
  • 1 – Invalid input
  • 2 – Invalid license key
  • 3 – No match
  • 4 – Multiple match

 

GetCityNamesForZipCode

Cities in a zip code may be referred to by more than one name or spelling. The GetCityNamesForZipCode operation returns the actual city name as well as acceptable alternatives. In the example below, the default city name is “Boynton Beach” and an alternate name is “Village of Golf.” Both city names are acceptable city names on file with the USPS.

CDYNE Postal Address Verification GetCityNamesForZipCode Return Codes:

  • 0 – Success
  • 1 – Invalid input
  • 2 – Invalid license key
  • 3 – No match

 

GetUrbanizationListForZipCode

Urbanizations are commonly used in Puerto Rico urban areas and they denote an area, sector, or residential development within a geographic area. They are important designators because identical street names and address number ranges can be found within the same zip code. In the following example, the urbanization name is the only element that identifies the location of a particular address.

MR OSIRIS GONZÁLEZ
URB ROYAL OAKS
123 CALLE 1
BAYAMÓN PR 00961-0123

MR PEDRO RIVERA
URB HERMOSILLO
123 CALLE 1
BAYAMÓN PR 00961-1212

CDYNE’s GetUrbanizationListForZipCode programming method will return the urbanization list for the zip code input. In the following example, the zip code, “00965” returns five urbanization names. Urbanizations typically use the abbreviation URB, but there are exceptions as shown in the example below. BDA (Barriada), BO (Barrio), and VILLA (Villa) are the correct abbreviations to use. The USPS published a detailed addressing standards document for Puerto Rico and US Virgin Islands, which can be found here.

CDYNE Postal Address Verification GetUrbanizationListForZipCode Return Codes:

  • 0 – Success
  • 1 – Invalid input
  • 2 – Invalid license key
  • 3 – No match

 

You can read the rest of the blog series by accessing the links below:

Part 1: CDYNE Postal Address Verification API Overview

Part 3: CDYNE Postal Address Verification VerifyAddress Operation

Part 4: CDYNE Postal Address Verification VerifyAddressAdvanced Operation

Part 5: CDYNE Postal Address Verification DPV Code Suggestions

For more information about CDYNE Postal Address Verification, please contact an account representative at 1-800-984-3710, inquire by email, or initiate a chat for more details.

Or sign up for a free trial license key to test CDYNE Postal Address Verification.

2 views