SAINT Bernard: Beneath the Fur (part 3)

Last time (part 2) we covered the SAINT.Export methods… this time we’ll talk SAINT.Import.

Once you’ve started exploring SAINT Bernard and have downloaded some SAINT records you’ll feel an itching to update those records. You can update in a couple of ways. First, you can do some direct editing in the data grid. Secondly, if you really want to do some serious updating you can click over to the “Bulk Update” tab an create some rules that will update thousands of records within a few seconds. Despite how you update, the time will come for you to send your updated records back to SiteCatalyst so that they are represented in your reports – enter the “Upload Records” button.

As long as SAINT Bernard recognizes at least one updated record in your data set you’ll be allowed to push this button. Once pushed, the app then goes in to “Sending” mode and will show you a status screen for a few seconds…

Then you’ll get a “Success” notification (hopefully) – and you can rest assured that your updates have been sent to SiteCatalyst and will be showing up in your reporting soon. Oh, you’ll also likely get an email from SiteCatalyst (not SAINT Bernard) telling you your import is looking fine.

Let’s explore what is going on beneath the fur. Just as with the Exporting process the Importing process is a sequence of 3 different API method calls.
The 3 methods are…

SAINT.ImportCreateJob

SAINT.ImportPopulateJob

SAINT.ImportCommitJob

I will briefly describe how each of these method calls are used. If you download the SB source code you can see much of the ActionScript code for calling these methods in the com.saintbernard.utils.OMTRWebService.as file.

email_address - this is why SAINT Bernard asks for your email address when you first sign in, the API requires it here so that it can sent out email notifications (not one of my favorite API features BTW).

export_results – I always give “0” here; I’ve never understood the use case for doing otherwise.

header – this one is important; the first item in the array is always “Key” while the rest are the names of the other associated classification reports.

overwrite_conflicts - I always use “1” here.

relation_id – this is the number id of the base variable being classified (example, s.products => 51); these can be looked up via another API method (SAINT.GetCompatibilityMetrics) but SAINT Bernard has them hard coded in the SaintBernardGlobal.reportMap object.

report_suite_array – in the case of SAINT Bernard this array always just contains a single report suite id, but you can import to multiple report suites in theory.

This method returns a jobID. This is important to save as it will be a required value for making the subsequent method calls.

This one is very simple. You simple pass it the job_id that you received on the SAINT.ImportCreateJob call. By doing so you are telling SiteCatalyst that you are done sending records (i.e. “Populating”) and to get to work on this import. SiteCatalyst can take several minutes, even hours sometimes, to work your SAINT import into the related reports.

That’s all I have to say about these import methods. Please post questions or comments on this topic. Also, let me know if there are other aspects of SAINT Bernard that you think would be interesting to explore in this series.