Export Customer Details to AustPost Business

  • Posts: 161
  • Thank you received: 25
  • Hikashop Business
2 months 4 days ago #372079

-- HikaShop version -- : 6.5.0 [2605281459]
-- Joomla version -- : 6.1.1
-- PHP version -- : 8.4.21

We are using the Australia Post eDeliver Shipping Plugin to calculate postage rates between our dispatch point postcode and that of our customer
Works brilliantly.

We run an AustPost Business account and have a specified format and barcoding as provided by them to expedite postage at a discount to standard rates.

Obviously this platform isn't going to be a "partner" any time soon as below
auspost.com.au/business/ecommerce/integrate-your-shipping

What is required to go on the label is Name, Full Postal Address, Phone and Email and from that a label including a barcode to match that gets printed on our compatible printer

Seeking to discover if there is a way for the customer details to be able to be automatically exported (CSV) via email when an order is placed so we can place/import that into the AustPost portal to print the barcode on our compatible printer.

Maybe someone here has already achieved the same or has a solution/workaround to it's not all manual, as we are at present?

Thanks

Last edit: 2 months 4 days ago by yerg55. Reason: clarity and spelling

Please Log in or Create an account to join the conversation.

  • Posts: 85988
  • Thank you received: 14154
  • MODERATOR
2 months 4 days ago #372085

Hello,

You can do this natively with HikaShop's Mass actions, no custom development needed.

Go to System > Mass actions and create a new mass action on the Orders table. Set it up like this:

- Trigger: "After an order is created" (or "After an order is confirmed" if you prefer to wait for payment).
- Filter (optional): restrict to a given order status, shipping method, etc., so only the relevant orders are exported.
- Action: "Export CSV". In that action you can set a file path and an email address. When the trigger fires, HikaShop writes the CSV and sends it as an attachment to the address(es) you entered. So each new order automatically emails you a CSV.

For the columns, the export format is configurable, so you can output exactly Name, full postal address, phone and email and arrange them to match the column layout that the AustPost portal import expects. If the AustPost import lets you map columns on their side, you have even more flexibility.

Two things to keep in mind:
- HikaShop exports the order data only. The barcode itself is still generated by the AustPost portal when you import the file, HikaShop does not produce the AustPost barcode.
- A per-order trigger gives you one CSV per order. If you would rather batch them, you can instead run the same Export CSV mass action manually from the Orders listing (select the orders, then run the action), or schedule it, and get a single CSV with all selected orders.

Also, Australia Post as an API. So, we could develop a full blown plugin in order to integrate properly HikaShop with Australia Post so that you could display delivery dates, provide tracking of shipment, lockers deliveries, shipping labels printing...
However, building this requires having a real shipping account with Australia Post:
developers.auspost.com.au/apis/st-registration
and then validating the integration with them: developers.auspost.com.au/apis/shipping-...n/direct-integration
So it's a whole process which we can't do fully on our end. They provide a list of partners who might be able to work on this too:
developers.auspost.com.au/apis/shipping-...platform-integration

The following user(s) said Thank You: yerg55

Please Log in or Create an account to join the conversation.

  • Posts: 161
  • Thank you received: 25
  • Hikashop Business
1 month 4 weeks ago #372170

Thanks for that Nicholas.

As always clear and concise

Please Log in or Create an account to join the conversation.

  • Posts: 161
  • Thank you received: 25
  • Hikashop Business
2 days 6 hours ago #372920

If I'm in the Admin I can process and get every order but these settings don't email anything following an order
Wasn't fussed if it was what I needed but nothing happening

I'm thinking I need something correct with the selections in the second and third columns

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 85988
  • Thank you received: 14154
  • MODERATOR
1 day 19 hours ago #372925

Hi,

Remove these filters. It's a "Action" you want to use. The Export CSV file one. There, you can select the columns you want to export and the email address where the email notification can be sent with the CSV file.

Please Log in or Create an account to join the conversation.

  • Posts: 161
  • Thank you received: 25
  • Hikashop Business
8 hours 28 minutes ago #372951

Ok I "think" I'm getting there but still stuck
Here's what I have.

  • Customer orders
  • Customer receives order email
  • Administrator receives order email
BUT
This mass action sending email isn't a happening thing
I'm using the same email as the J! admin and HikaShop admin which receives the emails ok

"You must fill a valid path to use the email function." ... I added a path on the server in case that was required. Nothing saves there

If I press the "process" button it automatically downloads the csv.

The CSV generated contains both Billing and Postal Addresses ... only seeking Postal to export to AustPost
I saw that putting postal addresses into the filters would achieve that

Attachments:
Last edit: 7 hours 32 minutes ago by yerg55. Reason: Clarity

Please Log in or Create an account to join the conversation.

  • Posts: 85988
  • Thank you received: 14154
  • MODERATOR
2 hours 45 minutes ago #372952

Hi,

The missing piece is the file path.

In the Export CSV action, under the columns, there are two fields: an email address and a file path. The action only emails the CSV when both are filled in. With the email set but the path left empty, nothing is sent.

That is also why it works when you process orders by hand in the admin but not on a real order. From the admin the action streams the CSV straight to your browser as a download, so no path is needed. When it runs automatically after an order is confirmed on the front end there is no browser to download to, so it has to write the file to the path first and then attach that file to the email. No path means no file, and so no email.

So fill in the path field, for example:

exports/austpost_{time}.csv

The {time} token keeps each file unique. Make sure that folder exists and is writable. Leave your email address in the email field, and from then on the CSV is written there and emailed to you on every confirmed order.

One thing to check while testing: your trigger is "After an order is confirmed", so the order has to actually reach the Confirmed status, meaning payment is completed. An order left in Created, an unpaid bank transfer for instance, will not fire it.

The following user(s) said Thank You: yerg55

Please Log in or Create an account to join the conversation.

  • Posts: 161
  • Thank you received: 25
  • Hikashop Business
46 minutes ago #372954

The full file name and time austpost_{time}.csv made all the difference on one end BUT the email was never sent/received :blink:

Please Log in or Create an account to join the conversation.

Time to create page: 0.338 seconds
Powered by Kunena Forum