background

Zenkraft Blog

Run your Logistics and Post-Purchase Experience on the Salesforce Platform.

Add External FedEx tracking numbers from an Order

Published on 11 April 2017 by in apex fedex 

Today's blog post we will show you how to add an externally created FedEx tracking numbers to an object. Updating tracking is the most common use case, that you are then able to query using the standard Salesforce reporting. We’ll be using the Order object in our demo here.

The code is made up of 3 parts.

  • Trigger on the Order Object:

Line 3: For when a brand new order is added with a tracking number

Line 7: For when the tracking number field is updated

Continue reading »

Send an email template with a GIF attachment

Published on 05 April 2017 by in  

Today we will show you how to send an email template with a GIF return label attached once a shipment is created from a Case.

Before you can write any code you need to set up three things;

  1. Email template
  2. Notification checkbox
  3. Create a new lookup relationship from the UPS Shipment to the Case object

First thing you need to do is create an email template. This you can do by going into Setup > Administer > Communication Templates > Em...

Continue reading »

Request FedEx rate for shipment from the Account Object

Published on 28 March 2017 by in  

Today we will show you how you can get FedEx rates for a shipment and add the users choice back onto the account object.

The first thing we need to do is set the “to” and “from” address of the shipment. In the code below we get the preference details to ship from and we get the ship to address details from the account object itself. We add all this information to a queuedShipment object.