Integration»Starter Script-Parcel

Starter Script-Parcel

Create a Starter Ship Script for Parcel

The basic shipping script will be created in your system and will set values in the ShipManager file for a new domestic parcel shipment (UPS, FedEx, USPS, Courier)

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

# Set recipient information
ShipTo_Name (This field should always have a value, either the company name or the recipient name)
ShipTo_AttentionName (Set this field if you have a company name and a contact. Some Intl may require a ShipTo_AttentionName value even if set in ShipTo_Name)
ShipTo_AddressLine1
ShipTo_AddressLine2
ShipTo_AddressLine3
ShipTo_City
ShipTo_StateProvinceCode
ShipTo_PostalCode
ShipTo_Country
ShipTo_PhoneNumber
ShipTo_EmailAddress

# Set carrier information
Carrier [UPS|FedEx|USPS|Courier]
Service [See Carrier Value List else if Courier then set to service name]

# Set reference fields
Ref_InvoiceNumber
Ref_PONmber
Ref_CustomerReference

# Set ancillary options
SaturdayDelivery [1 if checked]
ShipTo_ResidentialAddress [1 if checked]
Email_SendNotification_Receiver.n [1 if checked]

# Set user fields to store optional data
UserField_OrderDate
UserField_Source
UserField_URL
UserField01...UserField02

[commit record]

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

# Set package information
Weight.n
Value.n
Width.n
Length.n
Height.n

[commit record]

# Optional
Perform External Script "External - Show" in ShipManager file (With a script parameter of the related ShipManager ID)

Once the ShipManager record is created, you can pass the _pk_ShipManagerID.n value to scripts in the ShipManager file to show the record, ship the record, get rates, void or track.