Integration»Starter Script

Starter Script

Create a Starter Ship Script

The basic shipping script will be created in your system and will set values in the NRGship data file for a new domestic shipment.

1. Create a new script and call it "Set Ship Data"
2. Using the Set Field script step, you will need to set a value in the following fields of the FedEx_Ship table:


# Set recipient information
Destination_Contact_CompanyName
Destination_Contact_PersonName
Destination_Address_Line1
Destination_Address_Line2
Destination_Address_City
Destination_Address_StateOrProvinceCode
Destination_Address_PostalCode
Destination_Address_CountryCode
Destination_Contact_PhoneNumber
Destination_Contact_EmailAddress

# Set service information
Service

# Set ancillary options
SpecialServices_SaturdayDelivery [1 if checked]
SpecialServices_ResidentialDelivery [1 if checked]
SpecialServices_EmailNotification_Recipient_ShipAlert [1 if checked]

Next, if you know the weight or dimensions of the package, you can pre-populate the data for the shipper by setting additional values:

# Set information for first package - in packages table
Weight
DeclaredValue
Dimensions_Width
Dimensions_Length
Dimensions_Height
# Set reference fields
ReferenceInfo_CustomerReference
ReferenceInfo_PONumber
ReferenceInfo_InvoiceNumber

[commit record]

# Optional
Perform External Script "External - Show Ship ID" in NRGship FedEx Data file (and pass the related ship record's __kp_Ship_ID value as a Script Parameter)

Once the NRGship record is created, you can pass the :__kp_Ship_ID value to scripts in the NRGship FedEx Data file to show the record, ship the record, get rates, void or track.