In this section, we are going to create the ContosoSendOrder Logic App. Since there are no templates available for HTTP receive and AS2 send, we will have to create them ourselves:
- Create a Logic App named ContosoSendOrder
- Navigate to Workflow settings and select the Contoso-SupplyChain integration account
- In Definition, select HTTP request trigger
- Add the Encode to AS2 message connector and select the Contoso-SupplyChain integration account
- Configure the Encode to AS2 message connector as follows:
- Configure the HTTP action to POST the message to ShipAnyWhereOrderService:
- Ensure that the body is binary encoded using the following expression:
base64ToBinary(body('Encode_to_AS2_message')?['AS2Message']?['Content'])
- Post the following X12 message to the ContosoSendOrder Logic App:
ISA*00* *00* *ZZ*Contoso *ZZ*ShipAnyWhere *991221*1226*U*00401*000000025*0*T*>
GS*PO*THEM*US*19991221*1226*1*X*004010
ST*850*0001
BEG*00*NE*3859199838**950727***IBM
PER*AA*Andrew Carlson*TE*(708) 555-2930
DTM*002*970523
PO1*1*93*BX*145.39**CB*KOW-20392-10
PID*F****Uninterruptible Power System
PER*AA*Camilla Anderson*TE*(708) 555-2011
PO1*2*25*EA*35.68**CB*1093-4927-001
PID*F****High Volume Printer Stand
PER*AA*Miranda Cappelan*TE*(708) 555-1111
PO1*3*4*PC*2002.91**CB*ABX-2001
PID*F****Electronics Cabinet Package (56" High)
CTT*3
SE*14*0001
GE*1*1
IEA*1*000000025
When both Logic Apps are successfully executed, you should have an XML purchase order in ShipAnyWhere's blob location.
Successful execution of the ContosoSendOrder Logic App should look as follows:
Successful execution of ShipAnyWhereOrderProcess is as follows: