[
{
"operation": "modify-overwrite-beta",
"spec": {
"items": {
"*": {
"idExterno": "=concat('pdvsync-preco-', @(1,skuId),'-',@(1,branchId),'-', @(1,lastChange))",
"situacao": 0,
"skuId__": "=split('-', @(1,productId))",
"skuID_": "=lastElement(@(1,skuId__))",
"price": "=toString",
"priceConverter_": "=split('\\.', @(1,price))",
"priceConverter": "=join(',', @(1,priceConverter_))",
"erpReferenceKey": "=toString"
}
}
}
},
{
"operation": "shift",
"spec": {
"items": {
"*": {
"idExterno": "idExterno[&1]",
"skuId": ["items[&1].[0].idRetaguardaProduto", "items[&1].[0].idRetaguarda"],
"erpReferenceKey": "items[&1].[0].codigoProduto",
"priceConverter": "items[&1].[0].valor",
"quantity": "items[&1].[0].saldo",
"skuID_": "items[&1].[0].codigoProduto",
"productId": "items[&1].[0].idRetaguardaProduto",
"lastChange": "items[&1].[0].dataAtualizacao"
}
}
}
},
{
"operation": "default",
"spec": {
"_attr_access": "items",
"items[]": {
"*[]": {
"*": {
"idInquilino": "{{ID_INQUILINO}}",
"idProprietario": "{{FILIAL_ID_PROPRIETARIO}}",
"loteOrigem": "{{LOTE_ORIGEM}}",
"situacao": 1,
"sequencial": 0,
"sincronizadoEtiquetaEletronica": 0,
"dataHoraVigenciaInicial": "{{DATA_HORA_AGORA}}",
"dataHoraVigenciaFinal": "{{D_MAIS_NOVENTA}}"
}
}
}
}
}
] |