Advertisements

BizLink install part 3

Now that we got some AS2 action going on I needed to figure out how to handle some incoming purchase orders. With a little bit of poking around I was able to get it to go.

The first thing I needed to configure was the ‘parties’

I wanted to emulate an invoice coming in so I took the external partner and set their identifiers to match a real partner but it was really pointing my other AS2 box. Then for the server owner I set it to one of our real id’s. These Identities are not AS2 identities but are ISA (EDI x12) identities. So for example the EDI might be like

ISA*00*          *00*          *ZZ*666791NF       *08*999485US00

you would set the server owner to ZZ 666….  and the external to 08 999…

on this screen

parties

 

So now you have parties setup, but now we need to instruct BizLink what to do with the files when it gets them!

The simplest thing to do is under transports, set a file copy (upload) on your server owner, set the file path and the format of how you want the file named and you will be good to go.

Transports

That will work, but what if you want say all 810’s from a certain partner to go to a certain directory? In this case create another File Copy (Upload) rename it to say Export Walmart 810 and then set its export folder to a 810 walmart specific one. That’s all nice and dandy but what actually tells it to use that particular export? The processing rules of course!

processing rulesGo ahead and click add, to add a new processing rule. We want a Recipient rule (for when our server is the recipient)

First give it a name.

rules1

Then you get to set the conditions they can either be AND or they can be OR conditions. We want an AND so both conditions evaluate as true.

conditions

We set the Sender Qualifier + Id to match our sender ID (in the ISA) and the we set the Transaction_IdCode to = 810.

Ok, now we need to tell it an action to do when the conditions are met.

Set that underneath in the actions dialogue

actions

The first action will send back a 997 if requested and the second is for the routing. If we looking into the routing rule it is simple enough, give it a name, and then select a transport.

routing

There you have it, when the doc matches it will get exported to the correct folder. Next we will mess with some scripts, until next time.

Advertisements

List of Functional Identifier Code’s

Well, assuming I didn’t mess up anything here they are

PG 100
NL 101
AC 102
AP 103
SA 104
BF 105
MH 106
MC 107
MK 108
IA 110
IF 111
PQ 112
CL 113
MR 125
DI 128
ED 130
AK 131
HU 132
CW 133
SL 135
TT 138
SL 139
LT 144
RY 146
RZ 147
IJ 148
NT 149
TN 150
TA 151
GR 152
CB 153
BC 155
NP 157
TJ 158
MP 159
SJ 160
TR 161
AS 163
ER 170
FC 175
FC 176
EP 179
AN 180
RD 185
AE 187
EC 188
AF 189
SV 190
SD 191
GT 194
LA 195
PK 196
TO 197
ME 198
TO 199
ME 200
ME 201
MJ 202
MG 203
SM 204
MN 205
MG 206
IM 210
BL 211
TM 212
MI 213
QM 214
PU 216
FG 217
AB 219
AH 220
CE 222
MQ 223
MA 224
MY 225
TU 227
MZ 240
DS 242
PN 244
ME 245
SU 248
AT 249
PV 250
CP 251
IE 252
PE 256
MG 259
MG 260
ME 261
ME 262
ME 263
MG 264
TO 265
MG 266
AD 267
PF 268
HV 269
HS 270
HB 271
LN 272
ID 273
PW 274
PI 275
HR 276
HN 277
HI 278
TE 283
IH 284
CV 285
KM 286
CO 290
RO 300
RO 301
RO 303
SO 304
SO 309
AQ 309
IO 310
SO 311
IO 312
QO 313
QO 315
SO 317
SO 319
SO 322
SO 323
SO 324
SO 325
SO 326
SO 350
AU 350
SO 352
AV 352
SO 353
AX 353
SO 354
AY 354
SO 355
AZ 355
SO 356
BA 356
SO 357
BB 357
SO 358
BD 358
SO 361
OC 362
SR 404
IR 410
TB 412
CR 414
IC 418
SR 419
CH 420
IS 421
DM 422
RL 423
SB 424
RW 426
MW 427
RU 429
RM 431
RX 432
RH 433
RJ 434
RK 435
LI 436
RV 437
EV 451
PL 452
ST 453
PB 455
EI 456
TP 460
TP 463
TP 466
TP 468
RB 470
SN 475
TP 485
TO 485
TP 486
TO 486
TP 490
TP 492
TP 494
MM 500
PH 503
CC 504
RN 511
MV 517
AO 521
MD 527
LR 536
ES 540
D4 561
D3 567
D5 568
SE 601
TS 602
EX 620
MO 650
GL 715
RF 753
RG 754
CP 805
PJ 806
IN 810
CI 811
CD 812
TF 813
GE 814
CS 815
OR 816
RP 818
JB 819
RA 820
FR 821
AA 822
LB 823
AG 824
TI 826
FR 827
DA 828
PY 829
PS 830
CT 831
SC 832
ME 833
BE 834
HP 835
RQ 836
HC 837
TD 838
PK 839
RQ 840
SP 841
NC 842
RR 843
CF 844
PA 845
IB 846
MX 847
MS 848
CF 849
PO 850
LS 851
PD 852
RI 853
DD 854
PR 855
SH 856
BS 857
SI 858
FB 859
PC 860
RC 861
SS 862
RT 863
TX 864
CA 865
SQ 866
PT 867
MT 868
RS 869
RS 870
CM 871
ME 872
CU 873
CQ 874
OG 875
OG 876
CJ 877
QG 878
QG 879
GP 880
CK 881
IG 882
DF 883
MF 884
UA 885
UB 886
CN 887
QG 888
QG 889
AM 893
DX 894
DX 895
QG 896
GC 920
GC 924
GC 925
GC 926
AI 928
OW 940
AR 943
RE 944
SW 945
AW 947
IO 980
IR 980
IM 980
IA 980
GF 990
NR 993
FT 996
FA 997
AL 998

Open source EDI

It seems like things are picking up a bit in the arena of Open source EDI, BOTS is getting better http://bots.sourceforge.net/en/index.shtml

And I just ran across this implementation of AS2 written in VBscript! http://code.google.com/p/babelas2/ can you believe that! You do know that most businesses pay a lot of money for their AS2 software…. it is insane!

I was extremely amused by this post about EDI and SaaS

http://blogs.gartner.com/benoit_lheureux/2009/03/17/saas-apis-are-retro-%E2%80%93-you-know-just-like-edi/

As the guy who gets to read really long EDI specs I can emphasize with this post. Even more amusing was the fact that I had implemented the 48 page Target 850 purchase… and am in the middle of reading and implementing the Taleo API docs. It was like this blog post was written for me!

My EDI Qlikview Dashboard

Find this post interesting? Do you like interesting things? Maybe you would like my invention, a connectible candle called a WickBrick!

Get one here http://wickbrick.etsy.com/

WickBrick

In order to get a little better visibility into our world of EDI I thought it would be fun to create a simple EDI Qlikview Dashboard. It sucks in data from a couple of Databases: AS2, TrustedLink, and Adage and shows it in a somewhat linked manner.

The first is the AS2 tab which shows incoming AS2’s, with a fancy bargraph showing how many transmissions per day. It also highlights in red if the AS2 has not yet been processed into the ERP.

It also allows me to click on an transmissions and review the raw EDI.

It also has tabs for incoming orders and outgoing invoices. All and all an interesting start to what will hopefully become a really useful dashboard. In the future I would like to add visibility to outgoing 940’s, 856’s, and perhaps incoming 945’s.

Silly me, using the right config file for Altova Mapforce

I’ve been using mapforce for quite a long time and love it. Up until now I have always just used the default built in 00501 configurations for EDI. Well, I ran into an edi doc that needed a few additions. Well, cool I thought. I will just go in and edit the .config file, I love that flexibility! Well little did I know that if I had gone here

http://www.altova.com/components_mapforce.html

I could have just downloaded all of the various flavors from 3040-5030 (about 15 in total I think) and then I could have picked the right one to start out with! How’s that for ease of use!

Notice them all along the top! Oh, yeah and if you press the button that says Download additional EDI collections it will get you to the same place!

So since I’m lazy I just opened up the .mfd file with notepad and replaced the old config for the new config. I had to move around a few things but then wala I’m using that version of the config file. Nifty huh.

Convert Eif invoice to outgoing 880, quick Altova Mapforce Tutorial

Started working on converting an .eif file into an X12 880 using mapforce. One thing I learned was that when using the TransformTool.jar you can just specify a * (asterisk) for the new file name and it will use the original file name with .xml for the transformed file. Very Useful.

So my work flow goes something like this. Create a 880 svn repository. Get an .eif invoice and convert it to .xml using the TransformTool.jar (Manually for now)

Transform Explanation Doc is here http://mellerbeck.googlepages.com/sv_diary_5305664_ERPTEEBarcodingInst.doc

If you are curious the transform definition is

<?xml version=”1.0″?>
<!DOCTYPE InputFile SYSTEM “C:\XML\InputFile.dtd”>
<InputFile>
<Directory>
<DirName>c:\XML\810_Outbound</DirName>
<DirType>.eif</DirType>
<DocTypes>
<DocType>
<DocName>Invoice</DocName>
<DocTransform>c:\XML\Invoice_Outbound.xsl</DocTransform>
<NewFile>
<NewFileType>.xml</NewFileType>
<NewFileName>*</NewFileName>
<NewFileDir>c:\XML\810_Outbound\Processed</NewFileDir>
</NewFile>
<SaveOption>
<SaveOptionType>Save</SaveOptionType>
<SaveOptionDir>c:\XML\Archive</SaveOptionDir>
</SaveOption>
</DocType>
</DocTypes>
</Directory>
</InputFile>

Open up Mapforce and use the provided .dtd from Adage (Invoice_Outbound.dtd) and then provide it the converted .xml file (from above) to use as a reference for the mapping. (clicking the add schema/xml)

Then click the EDI button and add the 880 (under x12 tab)

Next I start studying the vendors EDI specs. I first start with ISA line, and set mapforce to match the requested Data Element Separator, Composite Separator, Repetition Separator, and Segment Terminator. I get to this by right clicking the EDI portion and then select properties. I also click the Extended button to change the Interchange Control Version Number (If needed).

Next I started creating constants and connecting them to the appropriate parts of the ISA. I just learned that Segment Terminator 85 (hex 85) equals a newline. I connect the ID qualifier and the sender/receiver ID.

Next work down to the GS. Connect a constant of GP.

Next I create my lame’o Control number generator. Basically read in two numbers, add one to it, and write out the new numbers to the same file. This is for the GS and ST segment.

I add a ‘now’ from the datetime functions and connect it to the invoice date, and then connect the document number to the invoice number (F76).

Then connect the CustomerPurchaseOrderNumber to the Purchase Order Number and PurhcaseOrderSalesOrderNumber connect to Vendor Order Number.

I connected constants for the Terms of Sale.

I met kindof a nasty snag with the date format of the InvoiceDueDate. From Adage it is output like

26-jun-2008 00:00:00

This isn’t a format that Mapforce Recognizes as a date 😦 so I had to parse out the day, month, year using a substring-before and replace combo, and then value map the jun into a 6 then connect it all to a datetime-from-parts. There might be an easier way so I posted the question on the Mapforce forum.

Next, started working on the N segments. This was interesting because I had never looked up a bill to name before in Adage. It is stored in the en_bill_tbl so did a select en_bill_name where en_bill_key = ‘whatever’

On further review all that was needed was to send the Remit to which made everything much easier. I connected a RE to the F98_1 and the rest of the name, address info etc…

Next I wanted to get looping information So I connect the Detail01 of my xml to the Loop0300 of the edi spec. Then I connected the price, quantity etc.. to the G17 etc…

To get the total invoice quantity use a sum and connect the InvoiceLineQuantity to it inside of a looping area of code.

I ran into the most annoying problem of not being able to import the generated EDI into TrustedLink. After a lot of work, thinking that it was a problem with the segment it turned out to be a slight bug in Mapforce. Inside of mapforce when I connected a now to the F337 it would truncate the time to 6 chars, but the code it was generating was truncating at 12 chars. Since that is invalid for the F337 the import was not happening successfully. To fix it you connect the now to a time-from-datetime and then to the F337 Time and the generated code truncates correctly.