Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 4.06 KB

setup-guide-with-mageplaza.md

File metadata and controls

75 lines (51 loc) · 4.06 KB

Setup guide

If you have mageplaza/magento-2-webhook already installed, you can integrate parcelLab easily through this extension as well.

Navigate to System > Webhook > Configuration:

image

Confirm that the extension is enabled:

image

Navigate to System > Webhook > Manage Hooks:

image

In the top right corner, click on the down arrow in button Add New top open the dropdown, from the dropdown select the first entry Order:

image

In the following screen fill all fields:

  • Name: Pick a descriptive name for this webhook, e.g. parcelLab Transfer Webhook on Event order
  • Status: Pick Enable
  • Order Status: Select all status
  • Store Views: Pick All Store Views or any other selection if you only wish to integrate specific shops
  • Priority: Enter 10

image

Navigate to the next screen by clicking on Actions in the navigation box on the left:

image

Now enter following values:

  • Payload URL: Enter https://api.parcellab.com/magento2/order
  • Method: Select POST from the dropdown
  • Authentication: Select Basic from the dropdown
  • Username: Enter your parcelLab User ID, typically a 7 digit numerical code
  • Password: Enter your parcelLab API Token, it requires write scope
  • Headers: No changes required
  • Content Type: Select application/json from the dropdown
  • Body: Copy and paste the body from order.liquid

Afterwards, click Save in the top right corner.

image

The first webhook is now set up and active and will transfer order data to parcelLab:

image

As the webhook is already active we can confirm correct data transfer after an order has been placed or updated:

image

Now, the process needs to be repeated a second time for another webhook. The process is identical, but 4 fields require different data entry. All data is shown below:

Field Webhook "Order" Webhook "New Shipment"
Create by clicking... Add New > Order Add New > New Shipment
Name parcelLab Transfer Webhook
on Event order
parcelLab Transfer Webhook
on Event new_shipment
Status Enable Enable
Order Status All Status n/a
Store Views All Store Views All Store Views
Priority 10 10
Payload URL https://api.parcellab.com/magento2/order
important: .../order
https://api.parcellab.com/magento2/new_shipment
important: .../new_shipment
Method POST POST
Authentication Basic Basic
Username parcelLab User ID parcelLab User ID
Password parcelLab API Token parcelLab API Token
Headers - -
Content Type application/json application/json
Body order.liquid new_shipment.liquid