Webhook Tracking Guide
An alternative solution to scheduled tracking for high-volume or express shippers
Overview
Zenkraft offers a Self-Service Webhook Tracking solution as an alternative to Scheduled Tracking. Webhook Tracking is ideal for customers who are tracking a high volume of Shipments, or who require updates as soon as possible.
There are three supported methods of adding webhook based tracking to your instance: using the Zenkraft Multi-Carrier Connected App, using a Custom Connected App, and using a Public Site.
For most users, our team recommends using the Zenkraft Multi-Carrier Connected App method. This method allows for a high volume of tracking updates, and utilizes a secure, authenticated connection to receive those updates.
If you would like to limit the access of our Managed Application, you also have the option of creating a Custom Connected App to facilitate the reception of tracking updates. This configuration process requires more steps than the Zenkraft Multi-Carrier Connect App method, but supports the same level of volume.
Finally, there is also the option of using a Public Site to receive Webhook Tracking updates. This option has the least secure connection and can support the lowest volume of all Webhook tracking methods. In rare cases, this may be the preferable solution. If you are considering utilizing Public Site-based Webhooks, please reach out to Zenkraft Support to verify if this may be a good solution for you.
NOTE: In order to utilize our Webhook tracking solutions, please ensure you are using Zenkraft Multi-Carrier Package Version 1.130.1 or later.
Zenkraft Multi-Carrier Connected App Webhooks
For most clients, the Zenkraft Multi-Carrier Connected App Solution will offer the best combination of simplicity of setup, security of connection, and support for high volume.
Create Webhook in Zenkraft Settings
To begin setting up Webhook-based tracking utilizing the ZK MC Connected App option, navigate to Zenkraft Settings and select the Tracking sub-tab.

Under the Webhooks section select Zenkraft Multi-Carrier Connected App as your Webhook type. You can leave Custom Domain blank. Hit save.

Grant Zenkraft API Access
You will then be asked to grant the Zenkraft API access to a number of different functionalities within your Salesforce Instance. Hit allow to proceed.

From there, if you have access to the Zenkraft API Dashboard, you will be redirected to your account's dashboard.

Within the API Dashboard you can click on the Webhook tab on the left side and confirm a Connected App Webhook has been created.

NOTE: If you do not have access to the Zenkraft API Dashboard, this will not have any negative affect on your ability to implement the Webhook solution. After clicking allow, simply close the tab that pops up.
Check and connect app
Navigate back to the tab where Zenkraft Settings is open. There should now be a button to Check and Connect App under the Webhook Section.

Click on this button. You should now see a Connected App Webhook appearing in your instance.

You have now successfully set up Webhook Tracking. Your next step is to disable any batch tracking jobs running in your instance.
Decrease frequency of schedule tracking
Scroll down to the Scheduled Tracking section.

Press the edit icon next to any schedulers which exist. A pop-up will appear where you can alter the cron expression to decrease frequency. You can decrease the frequency of the scheduled tracking job to once a day or or less to preserve Salesforce resources. Repeat for any remaining schedulers.


Custom Connected App Based Webhook Tracking
Create a custom app
Navigate to Setup and search for App Manager in the quick find box. After clicking into App Manager, select the New Connected App button.

In this new connected app enter a Name, API Name and Contact email.

Under API (Enable OAuth Settings) select the Enable OAuth checkbox. In the callback URL field
paste the following URL: https://api.zenkraft.com/sf/oauth.
In the Selected OAuth Scopes select Manage User Data via APIs (api) and Perform requests at
any time (refresh_token, offline_access.

Select the Require Secret for Web Server Flow checkbox.

Scroll to the bottom of the page and save, then continue.

Create an Integration User for webhook tracking
In the Setup quick box search Users then click the New User button.

Give the user a first and last name, an email, and a username.
Assign the user an arbitrary role. In
the User License dropdown, select Salesforce Integration. Under
Profile, select Salesforce API Only System Integrations.

Click save, then go to the email provided and complete the verification email from Salesforce.
NOTE: You may now be logged in as the Integration User, and encounter an error with the text “Access
Restricted for API Only Users - You've successfully updated your permissions, and can no longer
access
the UI. Close this window to continue.”
To resolve this issue, open an incognito browser and log in to Salesforce as a System Admin. Open Setup
and search for Session Management in the Quick Find Box. Find a session with the user you just
created, select the checkbox next to this session and hit the remove button at the top. You should now
be able to log in to Salesforce from a non-incognito browser from your normal user.
Assign permission set to your Integration User
Navigate to Setup and search permission sets. Look for Zenkraft - Tracking Permission Set and assign this to your new Integration User. CLick on Manage Assignments then Add Assignment.

Select your Integration User out of the list, then click Next, then Assign.

Run your App as your User
Return to Setup > App Manager and click Edit on the Connected App you just created.

Under the Custom Connected APp Handler heading click on the search function next to Run As and select the User you created, then save at the bottom of the screen.


Back within the Setup > App Manager navigate once again to your custom app and select Manage.

Click on Edit Policies.

Under Client Credentials flow select the search function next to Run As.

Select your newly created user.

Save, then navigate back to your Connected APp in App Manager and select View.

Click on Manage Consumer Details.

You will need to verify your user.
