Let Oomnitza be your single source of truth!
You'll get complete visibility of your assets as data from FedEx is automatically transformed into consumable information and actionable insights.
Connect Oomnitza and FedEx in minutes
Get the information and insights that you need by creating configurable workflows to make shipping tasks easier, such as:
- tracking the delivery status of a laptop that you ordered for an employee.
- creating shipment labels. These labels can be created in a variety of scenarios, such as when an employee returns equipment to the company and you need to track its shipment.
- canceling a shipment
Overview
In Oomnitza, FedEx workflows are categorized into two distinct types: those based on SOAP API and those using REST API.
1. SOAP API-based workflow:
- FedEx Track by Number
2. REST API-based workflows:
- FedEx Cancel Shipment
- FedEx Validate Shipment
- FedEx Create Shipment
- FedEx Track by References
- FedEx Track by Tracking Control Number
- FedEx Track by Tracking Number
Important
The FedEx Track by Number workflow, which currently uses the SOAP API, is scheduled for retirement on May 15, 2024. To facilitate this change, new workflows were developed based on the REST API, including the FedEx Track by References, Track by Tracking Control Number, and Track by Tracking Number presets. The new workflows were created to replicate the functionality of the workflow that is to be retired and to include improved security in the form of OAuth authentication. You should make the transition to the new REST API-based workflows at the earliest opportunity.
Contents
REST API-based workflows
For REST API-based workflows, you must enter your OAuth credentials in Oomnitza. There are two OAuth types you can choose from:
- FedEx: Requires only the Client ID and Secret, which can be generated by following the steps below.
- FedEx with Child Key and Secret: FedEx Compatible or Proprietary Parent-Child customers need to send a Child Key (Customer Secret) and Child Secret (Customer password), in addition to the Client ID and Secret. These child values can be obtained from FedEx support.
Getting your FedEx Client ID and Secret
To obtain your Client ID and Secret, complete the following steps:
- Sign up or log in to the FedEx developer portal.
- Go to the My Projects page and create a project.
- You will have options to select different APIs. Choose between:
- Ship API: Select this if you are using presets related to shipment creation, validation, or cancellation.
- Track API: Choose this option if you are using tracking-related presets, such as Track by Tracking Number, Track by Tracking References, or Track by Control Number.
- Accept the rate limits and click Next
- You'll need to define your territory.
- Ship API only: You should choose FedEx SmartPost® Returns and or FedEx Freight® LTL if you plan to, for example, create or validate SmartPost shipments.
- Click Create
- Your Sandbox API key and Secret key are generated on the Project Overview page.
- To get your production API key, click the Production Key tab.
- Before you obtain your production API key, you'll need to supply your FedEx Account Number. If you don't have a FedEx Account Number, you will need to open an account with FedEx and supply your credit card details.
Result
Copy your sandbox or production API key as the Client ID.
Copy your sandbox or production Secret Key as the Client Secret.
Adding the credentials
For FedEx® Compatible or Proprietary Parent-Child customers, complete the following steps:
- In Oomnitza, click Configuration > Security > Credentials.
- Click Add new credential (+).
- Click Advanced mode in the upper right of the Create Credential window.
- Add the information details.
- Click the AUTHORIZATION tab.
- Ensure that OAuth 2.0 is selected as the Authorization type.
- Ensure that FedEx with Child Key and Secret is selected from the SaaS list.
- Enter your sandbox or production URL for the FedEx API. Use
https://apis-sandbox.fedex.comfor the sandbox environment, orhttps://apis.fedex.comfor production. - Enter your sandbox or production Client ID and Client Secret.
- Enter csp_credentials or client_pc_credentials as the Customer type, depending on whether you are a Compatible or Proprietary Parent-Child customer.
- Enter your Child Client ID and Client Secret that you obtained from support.
- Click Authenticate.
For all other FedEx customers, complete the following steps:
- In Oomnitza, click Configuration > Security > Credentials.
- Click Add new credential (+).
- Select Advanced mode in the upper right of the Create Credential window.
- Add the information details.
- Click the AUTHORIZATION tab.
- Ensure that OAuth 2.0 is selected as the Authorization type.
- Ensure that FedEx is selected from the SaaS list.
- Enter your sandbox or production URL for the FedEx API. Use
https://apis-sandbox.fedex.comfor the sandbox environment, orhttps://apis.fedex.comfor production. - Enter your sandbox or production Client ID and Client Secret.
- Click Authenticate.
Create the workflow
To create an asset workflow, you must complete these steps:
- Click Configuration > Workflows
- Click Add (+) and select Assets from the list.
- Drag and drop the API block onto the Sandbox.
- Click Edit on the API block and enter FedEx in the search field.
-
Select a preset from the list below. To choose a preset, click the forward arrow (>).
- Select the credentials that you created in the previous step.
- Enter your sandbox or production URL for the FedEx API. Use
https://apis-sandbox.fedex.comfor the sandbox environment, orhttps://apis.fedex.comfor production. To save time, add this URL as a global setting. EnterFedEx.URLas the key and the chosen URL as the value. Refer to Adding global settings for more information. - Enter any mandatory information when prompted.
- Click Advanced Mode.
-
Select the Response tab. You can map the entire response by placing
{{response}}in the Response field and mapping it to an Oomnitza field. For mappings specific to Tracking workflows, see Recommended response mappings for Tracking presets. - Connect the Blocks.
- Save, validate, and activate your workflow.
FedEx Cancel Shipment preset
The FedEx Cancel Shipment preset cancels FedEx Express and Ground shipments that have not already been tendered to FedEx. This request will cancel all packages within the shipment.
You will need to supply the following information to run this preset:
- Account Number: The account number (account value) associated with the shipment.
- Tracking Number: This is a unique number assigned by FedEx to the packages for tracking. For example, "794953555571"
Did you know?
You can add more information to the message body in the Advanced Mode > Body tab such as the sender's country code and which packages are to be deleted. For further information, see FedEx API Docs: Cancel Shipment.
FedEx Validate Shipment preset
The FedEx Validate Shipment preset can be used to verify the accuracy of a shipment request before submitting it.
The required input information associated with this request is as follows:
| Name | Description |
| Account Number | The FedEx shipping account number. |
| Pickup type method |
Enter one of the following:
Consult the FedEx API Reference Guide for more information. |
| Service type | Indicates the FedEx service type used for the shipment, such as STANDARD_OVERNIGHT Consult the FedEx API Reference Guide for more information.
|
| Packaging type |
Indicates the type of packaging, such as For Express Freight shipments, the packaging will default to |
| Shipper & recipient details | |
| Delivery Instructions | Recipient Delivery Instructions. |
| Payment type |
Enter one of the following:
Note: This is required for Express, Ground, and SmartPost shipments. The payment type COLLECT is applicable only for Ground shipments. |
| Payor FedEx Account Number | Payor FedEx Account Number |
|
Label stock type used |
The label type, for example, |
| Image format document |
The image type, for example, |
| Weight unit type | The weight unit, for example, KG
|
| Weight value | The weight value, for example, 68.25. Consult the FedEx API Reference Guide for suggested weight values.
|
For a comprehensive overview of all the available data and fields that can be used to create a shipment, refer to the attachment below.
See also FedEx API Docs: Validate Shipment.
FedEx Create Shipment preset
The FedEx Create Shipment preset creates shipment requests and generates the labels (if the responses is synchronous) or a job ID (if the transaction is processed using an asynchronous method).
The required input information associated with this request is as follows:
| Name | Description |
| Option for merged Label and Doc | Enter one of the following:
|
| Date YYYY-MM-DD | Shipment Date. Format [YYYY-MM-DD]. |
| Shipper & recipient details | |
|
Delivery Instructions |
Recipient Delivery Instructions. |
| Pickup type method |
Enter one of the following:
Consult the FedEx API Reference Guide for more information. |
| Service type | Indicates the FedEx service type used for the shipment, such as STANDARD_OVERNIGHT. Consult the FedEx API Reference Guide for more information.
|
| Packaging type |
Indicated the type of packaging, such as For Express Freight shipments, the packaging will default to |
| Payment type |
Enter one of the following:
Note: This is required for Express, Ground, and SmartPost shipments. The payment type COLLECT is applicable only for Ground shipments. |
| Payor FedEx Account Number | Payor FedEx Account Number |
|
Label stock type used |
The label type, for example, |
| Image format document |
The image type, for example, |
| Weight unit type | The weight unit, for example, KG
|
| Weight value | The weight value, for example, 68.25. Consult the FedEx API Reference Guide for suggested weight values.
|
| Response Option - LABEL or URL ONLY |
This is to specify whether the encoded bytecode or the Label URL to be returned in the response. Valid values:
Note: For asynchronous shipment (More than 40 packages) request only the value LABEL is supported. |
| Account Number |
The account number associated with the shipment. |
For a comprehensive overview of all the available data and fields that can be used to create a shipment, refer to the attachment below.
FedEx Track by Tracking Number
The FedEx Track by Tracking Number preset returns package tracking information based on a tracking number for various shipping services. The required input information associated with this request is as follows:
- Tracking Number: Field which holds the Transportation Control Number value.
Example: N552428361Y555XXX - Include Detailed Scans: Enable to include detailed scans.
See also FedEx API Docs: Track by Tracking Number
FedEx Track by References
The FedEx Track by References preset returns tracking information based on alternate references other than Tracking Number such as Customer reference numbers. The required input information associated with this request is as follows:
- Value: Specifies the alternate reference value. Example: 56754674567546754
- Account Number: Specifies the shipper's account number.
- Ship Date Begin and Ship Date End: ShipDateBegin and ShipDateEnd are required to narrow the search. Example: 2020-03-29.
See also FedEx API Docs: Track by References
FedEx Track by Tracking Control Number
The FedEx Track by Tracking Control Number preset returns tracking information based on a Tracking Control Number. The required input information associated with this request is as follows:
- Tracking Control Number Value: Field which holds the Transportation Control Number value.
Example: N552428361Y555XXX - Ship Date Begin: ShipDateBegin is recommended to narrow the search. Example: 2020-03-29.
See also FedEx API Docs: Track by Tracking Control Number
Recommended response mappings for Tracking presets
The following are recommended response mappings for the FedEx Track by Tracking Number, References, and Control Number presets. You can create your own custom mappings using the provided format as a guide.
Table: Sample Jinja mappings
|
Field name |
Jinja templating response |
|
Tracking Number
|
{{ response.output.completeTrackResults[0].trackingNumber |
|
Current Status
|
{{ response.output.completeTrackResults[0].trackResults[0].latestStatusDetail.statusByLocale
}} |
|
Estimated Delivery Date
|
{{ response.output.completeTrackResults[0].trackResults[0].estimatedDeliveryTimeWindow.window.ends
}} |
|
Current Location of the Shipment
|
{{ response.output.completeTrackResults[0].trackResults[0].latestStatusDetail.scanLocation.city
}}, {{ response.output.completeTrackResults[0].trackResults[0].latestStatusDetail.scanLocation.stateOrProvinceCode
}} |
|
Sender Information
|
{{ response.output.completeTrackResults[0].trackResults[0].shipperInformation.contact.personName
}} - {{ response.output.completeTrackResults[0].trackResults[0].shipperInformation.contact.phoneNumber
}} |
|
Recipient Information
|
{{ response.output.completeTrackResults[0].trackResults[0].recipientInformation.contact.personName
}} - {{ response.output.completeTrackResults[0].trackResults[0].recipientInformation.contact.phoneNumber
}} |
SOAP API-Based Workflow
FedEx Track by Number preset
The FedEx Track by Number preset provides package tracking information based on a tracking number for various shipping services.
Note
The FedEx Track by Number workflow, which utilizes the SOAP API, is scheduled for retirement on May 15, 2024. We recommend transitioning to the following new workflows based on the REST API: FedEx Track by References, Track by Tracking Control Number, and Track by Tracking Number.
To use the FedEx track-by-number preset, you must enter the following authorization credentials:
- Authentication key
- Password
- Account number
- Meter number
Complete this procedure:
Go to FedEx - How to get the API key
Before you complete the request for your API Key, you get:
- Your authentication key
- Your meter number
Remember
Keep a copy of the authentication key safe. You’ll need it when you create the FedEx workflow.
When you submit your request, you get an email from FedEx with the following information:
- Web services password
- Account number
- Meter number
Create the workflow
- Click Configuration > Workflows
- Click Add (+) and select Assets from the list.
- Drag and drop the API block onto the Sandbox.
- Click Edit on the API block and enter FedEx in the search field.
- Select FedEx Track by Number, and click the right arrow (>).
- Enter the following authorization credentials:
- Authentication key
- Password
- Account number
- Meter number
- Click Advanced Mode and then click the Body tab.
- The FedEx Tracking Number is referenced in the property
{{fedex_tracking_number}}. - Click Advanced Mode and then click the RESPONSE tab.
- Enter this code in the Response field:
{{response['SOAP-ENV:Envelope']['SOAP-ENV:Body']['TrackReply']['CompletedTrackDetails']['TrackDetails']['StatusDetail']['Description']}} - Select the Oomnitza field that you created to capture the status of the shipment.
Run the workflow
- Connect the Begin, FedEx API, and End blocks. See the illustration below.
- Edit the Begin Block and add rules to trigger the workflow.
- If you set the Actions to New, the workflow will run for every new asset record added to Oomnitza. Alternatively, set the Actions to Schedule so that it only runs at a specific time or when manually triggered.
- Add Rule criteria. For example, you can add the rule FedEx Tracking Number is not Empty so that the workflow only runs if the Tracking number field is empty.
- Click SAVE.
- Validate, activate, and save your workflow.
FedEx responses
FedEx always returns a status code of 200, regardless of whether the workflow request for the status update is successful or not. For more information, read the HTTP status codes section in FedEx APIs Integration Best Practices.
Result
When a new FedEx tracking number is added to an asset or when the status of FedEx shipment changes, the delivery status of the asset is updated.
Comments
0 comments
Please sign in to leave a comment.