Retrieve information about FedEx shipments in Oomnitza such as the delivery status of a laptop that you ordered for an employee.
Before you start
Information that you need to create the workflow
To create FedEx workflows, 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
Add custom fields to Oomnitza
To capture the FedEx shipment information, you must create two custom asset fields.
FedEx Tracking Number
The tracking number that is either manually entered or populated using an asset feed will be stored in this field.
- From the Assets page, click Customizations.
- To add a new custom field, click Add.
- Make these changes:
- You must enter Fedex Tracking Number as the name.
- Select Short text as the data type.
- Select the Editable and Add updates to History check boxes. To avoid associating a tracking number with more than one asset, consider selecting Unique.
- Click SAVE.
FedEx response
Create a custom field to display the delivery status of the asset. When you create the workflow, you'll select this field to map the status value of the FedEx delivery.
- From the Assets page, click Customizations.
- To add a new custom field, click Add.
- Make these changes:
- Enter a name such as FedEx Response or Delivery Status.
- Select Long text as the data type.
- Select Add updates to History.
- Click SAVE.
Learn more about custom fields
Add the workflow
- From the menu, select Configuration>Workflows>Assets.
- To add a workflow, click +.
- Enter a unique name and a description.
- Click Add new. The Begin and End blocks are automatically added.
- Drag and drop the API block into the sandbox.
Add a rule to trigger the workflow
You add a rule to the Begin block to trigger the workflow.
- On the Begin block, click Edit.
- From the Actions list, select Schedule.
- To add rule the rule, click Add Rule, and add the following rule: FedEx Tracking Number is not Empty.
- Click SAVE.
Configure the API block
- On the API block, click Edit.
- 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 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.
- Connect the Begin, FedEx API, and the End blocks. See the illustration above.
- Click SAVE.
- Validate, launch, and save your workflow.
FedEx responses
FedEx always returns a status code of 200, regardless 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.
Links
Result
When a new FedEx tracking number is added to an asset or when the status of a FedEx shipment changes, the delivery status of the asset is updated.
Comments
0 comments
Please sign in to leave a comment.