I agree with Luc that Customs is always a lead agency in automation of clearances and it drags other agencies along, which is usually a big challenge. This is exactly what we experienced in Pakistan. The custom administration of the country tried for years to pull along other regulatory ministries but gave in at last. In this tug of war, Pakistan had to close down a state of art automated clearances system (PaCCS) and switch to a semi-automated one.
Why customs administration is so tech-savvy is quite interesting, though customs officer are a part of the same civil service in most of the countries. I would like to hear response of other colleagues about this.
In Pakistan, this change was brought about by the influx of electrical and civil engineers since the late 1990s. These qualified professional could not find technical jobs and opted for civil service through open competition, and re-engineered the business processes.