Quickstart Guide

Using Result Codes

#1. Know Your Result Codes

If knowledge is power, knowing these codes will make you a nondescript super person. But just like donuts at a bakery, although there are a lot of flavors, there's only a few that you get all the time. It's the same with the result codes. While there are many, and you should know them, you'll likely focus on just a few that are important for your use case.

Even though we have lots of codes, there are some that won't even apply to you. However, reviewing the codes that are available may give you information to make decisions you didn’t even know you could make.

Whatever you do, don’t skim through the Result codes like your license agreement and actually go through it carefully. You will be glad you did.

#2. Define "Good"

The ultimate goal of the Result Codes is to allow you to make a decision. The most basic and most common decision is, “Is this record good or bad?” For most users, if the record is good, it will go into one bucket. Those records are good to mail, or good to store. It a record is not good, they will likely go into another bucket. Those records can then undergo additional intervention.

What constitutes “good” for a user is in the eye of the beholder. Different companies have different use cases, so that is why Point #1 above is so important.

#3. Use Contains and Cascade Your Results

With Results being a delimited list, you cannot simply do a direct comparison. You should use the equivalent of a Contains function to categorize your results.

if(Results.Contains("AS01"))
    { //Perform actions for this Good record}

This is a very simple case. However, you will often want to look for more than 1 result code.

if(Results.Contains("AS01") or Result.Contains("AS03"))
    { //Perform actions for this Good record }

After you have found your “good” record, by definition everything else will fall into “not good”.

if(Results.Contains("AS01") or Result.Contains("AS03"))
    { //Perform actions for this Good record }
Else
    { //Perform actions for this “not good” record}

Once you get used to it, you can see that the possibilities are endless. Maybe you want more than 2 categories. The Result Codes allow just that.

if(Results.Contains("AS01") or Result.Contains("AS03"))
    { //Perform actions for this Good record }
Else if (Results.Contains(“AS02”))
    { //Perform actions for this partially good record }
Else
    { //Perform actions for this “not good” record}

#4. Result Codes Can Change

There are quite a lot of result codes. And guess what? There will be more in the future. We are constantly looking to add new features and improve our products.

With that said, we don’t know exactly what those changes will be. That's why we used String.Contains() when detecting for codes. That way any reordering or future additions won't affect your current code. It's also good to have a catch all Else at the end of your result code decision tree. This way, no records can fall through the cracks.

And that's it! Like a young bird you're ready to spread your wings and fly. While I have given you the instinct you need to survive, the best teacher is experience. Visit the result codes page on the wiki and familiarize yourself with them.