Monitored Item - Actions - Http Push



Getting Started

In order for BounceStudio Enterprise to log to your remote database using Http Push, you must enter the Web Url that BounceStudio will execute each time it retrieves/reads a bounced message from your monitored item. Next, you'll need to select the Bounce Types you would like the Web Url to be executed for. Finally, you must select the "Enable Http Push for this account" option in order to enable the Http Push functionality.





Using BounceStudio Variables

One important concept to remember when creating your Web Url is the idea of BounceStudio variables. A BounceStudio Variable is a data value that can be used anywhere in your Web Url.

For an explanation and list of available BounceStudio variables, click HERE.


Web Url

HTTP requests allow you to pass data via the HTTP query string (HTTP GET). The HTTP query string is specified by the values following the question mark (?) in a URL. For example, the URL "/example.asp?string=this+is+a+sample" generates a variable named "string" with the value "this is a sample." The variable and variable value can be accessed within the /example.asp script.

The best way to illustrate writing an Http Push Web Url using BounceStudio Variables is through an example. In the image below there are four variables being passed via the Web Url script (ie. EmailAddress, BounceType, POPAccount, and RawMessage). The values for these variables are #EMAIL#, #BOUNCETYPE#, #MONITOREDITEM#, and #RAWMESSAGE#, four of the available BounceStudio Variables. Each time BounceStudio Enterprise executes this Web Url, it will replace the BounceStudio Variables with their proper values prior to execution. Your Web Url script can take this data and perform actions on it. For example, you can have the data written to a database that resides on the web server hosting the Web Url script. The possibilities are limitless.

NOTE: One of the beauties of this is that you're not locked into any one scripting language. For example, you can configure the Http Push Web Url to execute an ASP script, PHP script, ColdFusion script, or whatever you want.



HTTP Port

Enter the HTTP port you'd like BounceStudio to use when executing your Web Url. The default port is 80, but you can enter any port you'd like. You can also select an SSL enabled port, such as port 443. If you enter port 443, then your Web url must begin with https:. If you enter port 80, then your Web Url must begin with http:. Port 80 and 443 are default ports for non-SSL and SSL connections, respectively.


Method: GET & POST

BounceStudio Enterprise supports both the HTTP GET and HTTP POST method. You can choose the method BounceStudio Enterprise will use, but typically you would choose the POST method if you're sending lots of data on each HTTP request. For instance, if you needed to send the #RAWMESSAGE# BounceStudio Variable to your Web Url script then you'd want to use the POST method. Often times this BounceStudio Variable contains a lot of data, and most web servers limit the amount of data you can send to it via the query string (HTTP GET). Using the HTTP POST method will avoid this limitation. If you choose to use the POST method, then BounceStudio Enterprise will automatically parse the Web Url you've entered and send the query string part of the Web Url via the HTTP request "message body", instead of the HTTP "query string".

If you're sending minimal data to your Web Url script, for example just the #EMAIL#, #POPACCOUNT#, and #BOUNCETYPE# BounceStudio Variables then you can probably get by with using HTTP GET, but you can still use HTTP POST too if you wish. It's really up to you in this case, and the method you choose will probably depend mostly on how you've programmed your Web Url script.


Error Handling

Each time BounceStudio Enterprise executes your Http Push Web Url script, it expects a return code indicating that the script executed successfully or unsuccessfully.


Return CodeDescription
0Tells BounceStudio Enterprise that your script executed successfully.
1 (or not zero)Tells BounceStudio Enterprise that your script failed.


Sending a return code back to BounceStudio Enterprise from your script is quite easy. The only output that your script should provide is an error code and error description. BounceStudio expects your output to be in the following format on the first line of your output:
[Error Code]-[Error Description]
For example, the following data returned from your script would indicate SUCCESS.
0-Successful
The following data returned from your script would indicate FAILURE.
1-Failed
Here's another FAILURE example:
2-Failed to connect to database.
For an example, using Active Server Pages (ASP), of what an Http Push Web Url script might look like, see the Samples folder within the folder where you installed BounceStudio Enterprise.


Enable This Http Push Action

Once you're done testing your BounceStudio monitored item Http Push settings you'll want to enable it. You do this by making sure the "Enable Http Push For This Account" check box is selected. Selecting this check box will tell the BounceStudio Bounce Service to execute this Web Url for each message it retrieves/reads. If, at anytime, you'd like to stop executing your Web Url then clear this same check box. BounceStudio Enterprise will continue to log to the BounceStudio Bounce Logs (if they're not disabled) if you do this.


Save Your Settings

In order for your new Http Push settings to take affect, you must click the "Save" button at the bottom of the Http Push settings screen.