Tools

From ZDN Wiki

Contents

Tools

API Explorer

The API explorer can be found in the API docs section of the Zong Developer Network website at http://developer.zong.com

It is a web forms driven tool allowing you to explore the various API methods without needing to write any code. You provide the various parameters and then invoke the method. If you are logged into the console you will see most of the information you will need to fill in the parameters display conveniently on the right side of the page.

Text Message Simulator

The text message simulator is a unique tool enabling you to perform real-life testing of your mobile services for every country and operator Zong supports. It is aimed at the testing of Premium rate services and for this reason an inbound message is expected first before outbound messages can be sent. On receipt of the inbound message in the form of an email message addressed as described below the system will assign an internal virtual phone number to the from address for the email, at this point it is possible to send text messages to this number.

Text messages, sent and received, run through our entire stack up until the point where the message normally exits our system and is forwarded to the carrier. At this point, using our virtual email gateway, the message is instead routed via email. The tool handles both inbound and outbound text messaging. We currently do not offer support for WAP push or binary messages using the simulator, but you should assume binary messages will work on handsets if text messages go through the simulation tool.

To send inbound text messages we use a special inbound email address format composed as follows:

<shortcode>.<mnoid>@simulator.zong.com

Where shortcode is the shortcode you setup for your services' respective market and mnoid is the Mobile Network Operator ID (Mobile Carrier ID) for which you would like to simulate the request. Be aware that you can only specify mnoid's which are present in the markets you have setup for your service. Please consult the list we provide here for the mnoid's.

The subject line of the email is used for the message content. In the subject line you would typically type the keyword or the keyword followed by some text just like in a normal text message. The email message body is ignored.

Upon sending of the email from your email client, your service handler URL will receive a hit. The handlers hit and the order in which they are hit all depend on the type of service you have setup.

For a one-off service your Transaction Handler URL will receive a hit with the content of the message and related information. It can replay as it would for a real inbound text message.

For a subscription service you must first go through the service subscription process, this will always be the first message you send. Further messages will then be routed to your SMS MO Handler URL as and if defined during service setup. A stop message will terminate the subscription and trigger notification to your subscription handler if one was defined.

Message receipt

When you receive the simulated text messages in the form of emails back from Zong you will notice that the From field has an email address similar to the one you used to send the inbound text message however it is prefixed with a virtual phone number.

<msisdn>.<shortcode>.<mnoid>@simulator.zong.com

You may simply reply to this if you intend to interact more with your service; consider this a "stateful" mechanism. However these virtual numbers are NOT assigned to you on a permanent basis, after a certain period of time the system will replace the number with another one, but as long as you simply hit the reply button of your email client you do not need to take this into consideration.

As mentioned these numbers are internal to our system and have NO external meaning. They will however get recorded by the API as any other msisdn would and appear in the various stats but will NOT generate any revenue ;-)

If you enabled the "session" option during service creation we will maintain the session for you just like in real life and your replies don't need not contain the keyword in the subject line of the mail. The timeout value defined during service creation is also applied here.

TEST MODE

!! IMPORTANT !! The simulator will only work for a market which set as being in TEST MODE, this is NOT the default! The test mode flag is managed at the market level, via the dashboard, so that you can have a single service with some markets in production and others being tested. If you put a market in test mode, remember to turn off TEST MODE before you go into production with that market!! Failing to do so will leave a back door open for clever users to use your service for free via email instead of mobile text messaging and you will not earn $$. Abuse of the simulator will also result in a shutdown without prior warning of your service or market. The simulator is a powerful tool and is intended to make your life as a developer much easier. Please respect this.


MNO List

A complete list of Mobile Network Identifiers (MNO) can be found here List of supported MNO's