You've already forked reflex-wms-connector
Compare commits
192 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a26fd9249 | |||
| 4624bab7ad | |||
| c754edaafb | |||
| adff1396c1 | |||
| 0b70c90257 | |||
| 2828c01cc4 | |||
| 4553507e3b | |||
| 830db1493b | |||
| 79ad7f53e8 | |||
| c280b2c83a | |||
| 3a0bbdc479 | |||
| 1e9ce7cdc4 | |||
| eefc7070ac | |||
| f9c62d5ee4 | |||
| bcf77601b9 | |||
| 1670a22218 | |||
| cdc78d71b1 | |||
| 6b840c0ce7 | |||
| 8ee7527ba4 | |||
| 1be67f65b2 | |||
| dec9a4b17f | |||
| eb6182c337 | |||
| 9f63f0ee62 | |||
| 5b3de10184 | |||
| 8cfd636c72 | |||
| 18808b6033 | |||
| a849b1c92e | |||
| 810e0eaa89 | |||
| 1dc77965ce | |||
| 9aee7a9448 | |||
| d4765890e5 | |||
| 58bcf838bd | |||
| 24f17f434e | |||
| c16c48b270 | |||
| 29e16f12cc | |||
| c74470b780 | |||
| fab2238278 | |||
| 432cca8ec9 | |||
| 08e4b04f7f | |||
| bf0ae15a50 | |||
| 3f7cd7a245 | |||
| 173deec755 | |||
| 85bfe55af7 | |||
| 730750b898 | |||
| d85abf8235 | |||
| 46a9a82e12 | |||
| ae0b82b6e4 | |||
| 5fc26e6015 | |||
| 236c2d754c | |||
| 5499e3059f | |||
| cae9bf80bb | |||
| ed0141584b | |||
| e6a27c2ba2 | |||
| 0a26159dc9 | |||
| a4f3bf8151 | |||
| 867fdc5743 | |||
| b69bfa50ba | |||
| 834abe1b78 | |||
| e190a16ddc | |||
| e63b14d0ff | |||
| 04bc005cda | |||
| 6e46d30221 | |||
| 1f2d3ab212 | |||
| 771915ad19 | |||
| 4a1fe56381 | |||
| a9a357d4ed | |||
| 0e3e60b45a | |||
| f0e27a6f88 | |||
| f72bcc2537 | |||
| 9700548214 | |||
| 96aec6555c | |||
| 54511c55f1 | |||
| de828ed606 | |||
| eaa7ef1b9b | |||
| 4c84e4195b | |||
| 113c94f100 | |||
| 7963b351aa | |||
| 8425747b42 | |||
| 03e20e7aed | |||
| 04b7974c77 | |||
| 087346139d | |||
| 0a4263d551 | |||
| b00302c8e3 | |||
| 55b7b54b44 | |||
| 26003c24f2 | |||
| 0468700574 | |||
| fe35481144 | |||
| d21204a949 | |||
| 46421972a8 | |||
| ccca6d1592 | |||
| 68622896f0 | |||
| fea5691ddd | |||
| 2fb5dcd103 | |||
| 04253d939f | |||
| b80623e631 | |||
| 23a87c1995 | |||
| a3a2fa3b23 | |||
| 22b26ac7d3 | |||
| 0b3f07add9 | |||
| 28659b1157 | |||
| 3de6a2f6a9 | |||
| 4afc7fa50c | |||
| 6910fb80a8 | |||
| 1052849c12 | |||
| 24a94caf29 | |||
| 513a5c2c3e | |||
| 011540fc51 | |||
| 5e9804db40 | |||
| e344cca043 | |||
| b0b4714df9 | |||
| 15bd095feb | |||
| c0dd029d1f | |||
| 2e0d61310b | |||
| f62ccadba5 | |||
| 2c29166ccb | |||
| 4534155f2e | |||
| 5948467818 | |||
| c63e4ff5c8 | |||
| 457cfc85c2 | |||
| 6809b32410 | |||
| 37a5e64e83 | |||
| 2f31833bc3 | |||
| cff0f18d8a | |||
| 22b78b4ffe | |||
| 25bf3110e9 | |||
| 0a32ead29a | |||
| 46a9dc8996 | |||
| 1eb262c91c | |||
| 2588fda3a8 | |||
| d060d3eb10 | |||
| 28e99e9a2b | |||
| 78b0b467a3 | |||
| 6f287e878a | |||
| c3a23254b1 | |||
| c47672b8cc | |||
| 9cdcd2784d | |||
| cfe6bddf8d | |||
| 0cb3cc7dd0 | |||
| 6b633663e9 | |||
| c801c574ab | |||
| 6282266c6d | |||
| cb9d61bfe9 | |||
| 60c6f812d1 | |||
| c2f6537e0c | |||
| f5970127b0 | |||
| 33c7ab08a7 | |||
| fb8f9ca651 | |||
| 16c7d6b686 | |||
| fc919c2199 | |||
| 3365a94098 | |||
| e055eab522 | |||
| c95bdc7f00 | |||
| 319cb6cc51 | |||
| 1f289e229c | |||
| fba36b5d77 | |||
| 892812e85e | |||
| a512e4c23a | |||
| 884ad540fe | |||
| 3a9620e3ee | |||
| d5573b6dba | |||
| 162b73e75f | |||
| bb4315bba1 | |||
| c4910785e0 | |||
| 5688244be2 | |||
| de5e94be3c | |||
| 646256d879 | |||
| 60355d1ba5 | |||
| 737763dc7f | |||
| 098b2d4e1d | |||
| 7b55a4bcd0 | |||
| b369dd8adf | |||
| fd1cfcc2c5 | |||
| fc8290648f | |||
| 378c1ba75f | |||
| d94a74d399 | |||
| a882ac4b86 | |||
| d2d9443fc7 | |||
| 30ae93b9e7 | |||
| 64e03640d1 | |||
| 270f90a9b3 | |||
| b5c85220b5 | |||
| 2409cf3a01 | |||
| 957df51487 | |||
| d09fa33577 | |||
| 3bcdec1d5d | |||
| b4ea1e7798 | |||
| 80aecb3aa7 | |||
| e02218f7b1 | |||
| 6270992346 | |||
| a544f6700d | |||
| 04ec57377a | |||
| b209e8b5e1 |
@@ -6,6 +6,6 @@ These FTL core files aim to translate data flow from Reflex WMS into Reflex plat
|
||||
|
||||
|
||||
|
||||
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/howto/reflex-wms-connector/
|
||||
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/partnerapp/reflex-wms-connector/
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@@ -18,22 +15,6 @@
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#assign refID = RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)>
|
||||
|
||||
<#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' />
|
||||
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds>
|
||||
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) />
|
||||
<#assign actorRP = JsonUtil.jsonToMap(response)>
|
||||
<#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? >
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorUpdated.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
@@ -42,7 +23,6 @@
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
||||
},
|
||||
"Payload": {
|
||||
"Name": "${carrier.carrier_designation?json_string}",
|
||||
"PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}",
|
||||
"IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c},
|
||||
"ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c},
|
||||
"IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c},
|
||||
<#if actorRP.Objects[0].Payload.IsShipFromConnected?? && actorRP.Objects[0].Payload.IsShipFromConnected>
|
||||
"ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}",
|
||||
</#if>
|
||||
"IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c},
|
||||
<#if actorRP.Objects[0].Payload.IsShipToConnected?? && actorRP.Objects[0].Payload.IsShipToConnected>
|
||||
"ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}",
|
||||
</#if>
|
||||
"PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}",
|
||||
<#if actorRP.Objects[0].Payload.CarrierServices??>
|
||||
"CarrierServices" : [
|
||||
<#list actorRP.Objects[0].Payload.CarrierServices as carrierService>
|
||||
{
|
||||
"ID" : "${carrierService.ID!""}",
|
||||
"Label" : "${carrierService.Label!""}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||
|
||||
"Address":
|
||||
{
|
||||
|
||||
<#-- if Reflex WMS is structured -->
|
||||
<#if carrier.carrier_structured_address??>
|
||||
|
||||
"Name": "${carrier.carrier_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
||||
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||
|
||||
<#-- if Reflex WMS is not structured -->
|
||||
<#else>
|
||||
<#if carrier.address?? >
|
||||
|
||||
"Name": "${carrier.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
||||
"CountryCode" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
<#if carrier.address?? >
|
||||
"Phones": ["${carrier.address.telephone?json_string}",
|
||||
"${carrier.address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -2,10 +2,6 @@
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@@ -19,23 +15,7 @@
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#assign refID = RFXtoRPprefixConsignee(actor.code?trim?json_string)>
|
||||
|
||||
<#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' />
|
||||
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds>
|
||||
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) />
|
||||
<#assign actorRP = JsonUtil.jsonToMap(response)>
|
||||
<#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? >
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorUpdated.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@@ -43,7 +23,6 @@
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
||||
},
|
||||
"Payload": {
|
||||
"Name": "${actor.designation?json_string}",
|
||||
"PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}",
|
||||
"IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c},
|
||||
"ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c},
|
||||
"IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c},
|
||||
<#if actorRP.Objects[0].Payload.IsShipFromConnected?? && actorRP.Objects[0].Payload.IsShipFromConnected>
|
||||
"ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}",
|
||||
</#if>
|
||||
"IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c},
|
||||
<#if actorRP.Objects[0].Payload.IsShipToConnected?? && actorRP.Objects[0].Payload.IsShipToConnected>
|
||||
"ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}",
|
||||
</#if>
|
||||
"PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}",
|
||||
<#if actorRP.Objects[0].Payload.CarrierServices??>
|
||||
"CarrierServices" : [
|
||||
<#list actorRP.Objects[0].Payload.CarrierServices as carrierService>
|
||||
{
|
||||
"ID" : "${carrierService.ID!""}",
|
||||
"Label" : "${carrierService.Label!""}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||
|
||||
"Address":
|
||||
{
|
||||
|
||||
<#-- if Reflex WMS is structured -->
|
||||
<#if actor.consignee_structured_address??>
|
||||
|
||||
"Name": "${actor.consignee_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
||||
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||
|
||||
<#-- if Reflex WMS is not structured -->
|
||||
<#else>
|
||||
<#if actor.address?? >
|
||||
|
||||
"Name": "${actor.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.address.address_3?json_string}",
|
||||
"CountryCode" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
<#if actor.address?? >
|
||||
"Phones": ["${actor.address.telephone?json_string}",
|
||||
"${actor.address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -16,13 +16,16 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#if dispute.dispute_closed == true >
|
||||
<#if dispute.dispute_closed == true >
|
||||
<#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||
},
|
||||
}
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@@ -30,7 +33,11 @@
|
||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
||||
}
|
||||
<#else>
|
||||
<#stop>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "Reference is empty">
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
@@ -42,24 +42,22 @@
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#if dispute.dispute_type_code=="050" >
|
||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "preparation order list is empty" >
|
||||
</#if>
|
||||
</#if>
|
||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "Type not supported" >
|
||||
</#if>
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#stop "WMS type code not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "Reason code not supported">
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -26,15 +26,16 @@
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
</#if>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
<#-- input : message RFX -->
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
@@ -18,22 +15,6 @@
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
<#assign refID = RFXtoRPprefixSupplier(actor.code?trim?json_string)>
|
||||
|
||||
<#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' />
|
||||
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds>
|
||||
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) />
|
||||
<#assign actorRP = JsonUtil.jsonToMap(response)>
|
||||
<#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? >
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorUpdated.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
@@ -42,7 +23,6 @@
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
||||
},
|
||||
"Payload": {
|
||||
"Name": "${actor.designation?json_string}",
|
||||
"PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}",
|
||||
"IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c},
|
||||
"ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c},
|
||||
"IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c},
|
||||
<#if actorRP.Objects[0].Payload.IsShipFromConnected?? && actorRP.Objects[0].Payload.IsShipFromConnected>
|
||||
"ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}",
|
||||
</#if>
|
||||
"IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c},
|
||||
<#if actorRP.Objects[0].Payload.IsShipToConnected?? && actorRP.Objects[0].Payload.IsShipToConnected>
|
||||
"ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}",
|
||||
</#if>
|
||||
"PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}",
|
||||
<#if actorRP.Objects[0].Payload.CarrierServices??>
|
||||
"CarrierServices" : [
|
||||
<#list actorRP.Objects[0].Payload.CarrierServices as carrierService>
|
||||
{
|
||||
"ID" : "${carrierService.ID!""}",
|
||||
"Label" : "${carrierService.Label!""}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||
|
||||
"Address":
|
||||
{
|
||||
|
||||
<#-- if Reflex WMS is structured -->
|
||||
<#if actor.supplier_structured_address??>
|
||||
|
||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
||||
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||
|
||||
<#-- if Reflex WMS is not structured -->
|
||||
<#else>
|
||||
<#if actor.optional_attributes?? >
|
||||
|
||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
|
||||
"CountryCode" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
<#if actor.optional_attributes?? >
|
||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||
"${actor.optional_attributes.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -55,7 +55,7 @@
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[
|
||||
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line3>
|
||||
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
||||
<#if refIDHmap?size != 0 >
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
{
|
||||
@@ -112,6 +112,7 @@
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[
|
||||
{
|
||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) />
|
||||
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
||||
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
|
||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
|
||||
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
|
||||
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
|
||||
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"Europe/Paris"}<#noparse>"></#noparse>
|
||||
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+01:00"}<#noparse>"></#noparse>
|
||||
|
||||
|
||||
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
"batch_1": "${batch_1?json_string!""}",
|
||||
"optional_attributes": {
|
||||
<#--"held_for_check": "false",
|
||||
"held _for_repacking": "false",
|
||||
"hold_code": "false", -->
|
||||
"hold_for_specific_code": "false"
|
||||
}
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
<#return dateutc?datetime.iso?iso_nz(locale)>
|
||||
</#function>
|
||||
|
||||
<#function RfxDateTimetoUTCWithTimezone rfxdatetime timezone>
|
||||
<#setting time_zone=timezone>
|
||||
<#return (rfxdatetime?datetime.iso?iso_utc)>
|
||||
</#function>
|
||||
|
||||
<#-- --------------------------------------------------------------------------------------- -->
|
||||
<#-- Split email reflex into json array string -->
|
||||
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
||||
|
||||
Reference in New Issue
Block a user