MSG Line: DPD B2C Predict shipment

Adjustments in the HEADER and PARCEL line

Service Code to use in the MPSSERVICE field (HEADER line) and SERVICE field (PARCEL line): 327

 

Extra line needed: MSG line

For Predict you have to add an extra MSG line in the MPSEXPDATA. You can only have one MSG line per shipment, regardless of how many parcels the shipment has. This MSG line can also exclusively be used for B2C Shipments. This implies that the MPSID should have the prefix B2C (see example in attachment)

The fields of the MSG line are:

  • MSGTYPE: type Predict. Can be 1 for email or 3 SMS
  • MSGVALUE: recipient of the Predict message. Can be an email or a phone number. Please note the phone number should be in the format +32#47712345678. Obviously, it’s impossible to use type 1 for a phone number or type 3 for an email.
  • MSGRULE: you can pretty much hardcode this to value 904. This is an internal code at DPD.
  • MSGLANG: the language of the Predict message, in two-letter code (NL, FR, EN, DE, etc). Please beware that for Belgium, BE is not considered a language.

 

An example of an MSG line with SMS could be:
MSG;B2C0530802539500220150902;3;+32#477223311;904;EN;;;;;;;;;;;;;;;;;

 

An example of an MSG line with email could be:
MSG;B2C0530802539500220150902;1;test@dpd.be;904;EN;;;;;;;;;;;;;;;;;

 

Or an example that contains both
MSG;B2C0530802539500220150902;1;test@dpd.be;904;EN;3;+32#479111111;904;NL;;;;;;;;;;;;;

 

MSGTYPE1, MSGVALUE1, MSGRULE1 and MSGLANG1 are, without exception, always mandatory for B2C.
MSGTYPE2, MSGVALUE2, MSGRULE2 and MSGLANG2 are optional for in case you wish to send the Predict to an extra recipient, but this goes with the “all or nothing” principle. You either fill in all four MSG2 fields, or none of them. Same goes for MSG3 and MSG4.

 

Example

#FILE;KD141664TQ;0530;20140527;151601;1;
#DEF;MPSEXP:HEADER;MPSID;MPSCOMP;MPSCOMPLBL;MPSCREF1;MPSCREF2;MPSCREF3;MPSCREF4;MPSCOUNT;MPSVOLUME;MPSWEIGHT;SDEPOT;SCUSTID;SCUSTSUBID;DELISUSR;SNAME1;SNAME2;SSTREET;SHOUSENO;SCOUNTRYN;SPOSTAL;SCITY;SCONTACT;SPHONE;SFAX;SEMAIL;SCOMMENT;SILN;CDATE;CTIME;CUSER;HARDWARE;RDEPOT;ESORT;RCUSTID;RNAME1;RNAME2;RSTREET;RHOUSENO;RCOUNTRYN;RSTATE;RPOSTAL;RCITY;RCONTACT;RPHONE;RFAX;REMAIL;RCOMMENT;RILN;MPSSERVICE;MPSSDATE;MPSSTIME;LATEPICKUP;UMVER;UMVERREF;PODMAN;;
#DEF;MPSEXP:PARCEL;MPSID;PARCELNO;CREF1;CREF2;CREF3;CREF4;DELISUSR;SERVICE;VOLUME;WEIGHT;HINSURE;HINSAMOUNT;HINSCURRENCY;HINSCONTENT;;
#DEF;MPSEXP:MSG;MPSID;MSGTYPE1;MSGVALUE1;MSGRULE1;MSGLANG1;MSGTYPE2;MSGVALUE2;MSGRULE2;MSGLANG2;MSGTYPE3;MSGVALUE3;MSGRULE3;MSGLANG3;MSGTYPE4;MSGVALUE4;MSGRULE4;MSGLANG4;MSGTYPE5;MSGVALUE5;MSGRULE5;MSGLANG5;;
HEADER;B2C0530800132970620140527;2;1;2348414745;;;;1;;;0530;05300000000262500;;KD141664TQ;Testsender;;Teststreet 55;;056;2800;Mechelen;;;;;;;;;;K;;;;Testreceiver;;Test Avenue 2;;208;;1000;Brussels;Mr.Test;;;;;;327;20140527;;;;;;
PARCEL;B2C0530800132970620140527;05308001329706;2348414745;;;;KD160145SQ;327;;;;;;;
MSG;B2C0530802539500120150902;1;testmans@dpd.be;904;NL;;;;;;;;;;;;;;;;;
HEADER;B2C0530800132970720140527;2;1;2348414746;;;;1;;;0530;05300000000262500;;KD160145SQ;Testsender;;Teststreet 55;;056;2800;Mechelen;;;;;;;;;;K;;;;Mr.Smith;;Teststreet 5;;208;;2000;Antwerp;Smith;;;;;;327;20140527;;;;;;
PARCEL;B2C0530800132970720140527;05308001329707;2348414746;;;;KD160145SQ;327;;;;;;;
PARCEL;B2C0530800132970720140527;05308001329708;2348414748;;;;KD160145SQ;327;;;;;;;
MSG;B2C0530802539500220150902;3;+32#477223311;904;EN;3;+32#479111111;904;NL;;;;;;;;;;;;;
#END;1;

Submitted by CustomerIT on Thu, 08/08/2019 - 15:27