Páginas filhas
  • VTEX Integration

 


01. OVERVIEW

While the Fintechs are financial market companies using technology to offer conventional services, the Techfin goes beyond: this a technology and data company offering customized financial services, which are more competitive, to help companies to overcome business challenges.

TOTVS Techfin arrives on the market to revolutionize the credit, payment, and services solutions, using the power of technology. You will be able to evaluate the necessary settings for the Techfin integrations with Protheus. VICTOR

02.  DETAIL

    PTo start the Configuration Wizard, enter WizardTF1 in the homepage


    Click OK

    Check if the initial requests have been met, and then click Next

    Enter Admin user and password, then choose the companies to set and click Next

    Choose Product to be set, in this case, TOTVS More Time to Pay or TOTVS Antecipa. Click Next.

    Accept parameters sharing verification

    Enter ClientID and Client Secret, sent by Techfin

    Complete the parameters according to as requested.






    For further information on TOTVS Antecipa integration, refer to this link:

    Integration Protheus x TOTVS Antecipa

    For further information on the TOTVS Financial Panel integration, refer to this link:

    Integration Protheus x TOTVS Financial Panel

    To implement TOTVS More Time to Pay:

    1) Apply the last Protheus continuous expedition, along with the dictionary differential through the UPDDISTR, according to the release version. 

    2) Registers of these items:

    • Supplying Company Supplier;
    • Financial Nature; 
    • Posting Payment Reason that does not perform any transaction or portfolio payable (P)

    3) Execute the o wizard according to the steps of the Configuration Wizard tab.

    The operation consists of scheduling the execution by FINA137F, which is the JOB in charge of requesting the transactions along with the Techfin and execute them in Protheus. 

    Operations flow:

    1) JOB FINA137F, with schedule and periodicity at every hour, will perform a request along with the Techfin to receive a message with the transactions to be executed in Protheus. The customer may adjust the periodicity, however, we recommend never to increase this interval too much, in order to keep the Techfin portal as synchronized as possible with Protheus

    2) After the operation in Protheus, the system sends to Techfin the operations performed in Protheus. Keeping Protheus and Techfin synchronized.

    3) The bills that will be negotiated are the ones with bar code registered. 

    The Posting Payment of Bills will be executed with the reason of the posting set in the Wizard, remembering that the Reason of the Posting does not involve any bank transactions , so this posting is not displayed in the bank statement. The history will be sent through the Platform. 

    This posting payment does not involve bank transactions. Note the posting reason is TEC, the same one chosen in the wizard previously registered, with the option “Involve Bank Transaction - “N”, the History “BANK SLIP PAID” is sent by the Techfin, the posting date is the processing date. 


    New bills are added according to the negotiation in the Techfin portal. Values are already added with the embedded interest, as well as the due dates agreed. The bar codes are made available properly registered in the bill. 

    Note the traceability of the bills and breakdowns according to the images. 




    You can postpone bills that were previously negotiated. 

    Postponing requests are added as soon as the Techfin Portal is released. 

    The requested installments will be changed with new due dates, new bar codes and increased interest negotiated.

    The Interests are added via Accessory values - FKD with the code chosen at the Wizard.




    Tables:

    • SE2 - Accounts Payable Table
    • SE5 - Bank Transaction Table
    • FI8 - Financial Natures Table
    • FKC - Accessory Value Codes
    • FKD - Bills x Accessory values

    Parameters:

    • MV_PRETECF – Prefix of the Bills negotiated must have the prefix of the bills in favor the Supplier
    • MV_TPTECF – Prefix of the Bills negotiated must have the title of the bills in favor the Supplier
    • MV_NTTECF – Nature of Negotiated Bills must have the financial nature registered for the bills in favor of the Supplier
    • MV_FNTECF – Prefix of the Bills negotiated must have the supplier code registered for the bills in favor of the Supplier
    • MV_LFTECF – Store of the supplier negotiated must have the supplier store code registered for the bills in favor of the Supplier
    • MV_MBXTECF - Reason of the Posting Code, of the anticipated bills.
    • MV_VATECF – Code of the accessory values, bills negotiated in favor of the Supplier, which were requested for extension

    **** Important: Sharing parameters must be observed according to the customer’s structure. We suggest the codes of Suppliers and Natures are the same, in all branches, however, in case this is not possible, it must be dealt with exclusively.


    Sources:

    • PRW  (In charge of requesting the TOKEN to Carol)
    • PRW  (In charge of the JOB receiving the Json with the bills to be posted/added or edited)
    • PRW (In charge of submitting the POST in the platform to inform the bills were properly operated in Protheus)
    • PRW    (In charge of the Posting Payment/Generation of Bills and Editing Bills routines)


    With the bank transactions, these functions are called: 

    • FaBaixaCp() to post bills entered
    • FaIncSE2() to add the new bills
    • FaAltSE2() to edit the bills postponed

    After running the Wizard, these tags are added to the appserver.ini

    In the Environment session

    fw-tf-debug=0
    fw-tf-carol-endpoint=https://totvstechfindev.carol.ai/api
    fw-tf-platform-endpoint=https://fmscash.dev.totvs.io
    fw-tf-rac-endpoint=https://admin.rac.dev.totvs.app

    [
    {
    "cnpj": "53485215000106",
    "boletos": {
    "pagos": [
    {
    "platformId": "5",
    "erpId": "T1|D MG 01 ||20210121A||NF|000001|01",
    "dataMovimento": "2021-01-21",
    "valor": 350000,
    "historico": "BOLETO PAGO"
    }
    ],
    "gerados": [
    {
    "platformId": "99999900000000001",
    "numeroTransacao": "200000001",
    "valorTotal": 360000.60,
    "juros": 10000.6,
    "parcelas": [
    {
    "numeroParcela": "1",
    "valorParcela": 120000.20,
    "dataVencimento": "2021-02-21",
    "dataEmissao": "2021-01-21",
    "numeroLinhaDigitavel": "34191092060023598295680002060004687700002288835",
    "numeroCodigoBarras": "34196877000022888351092000235982958000206000",
    "historico": "PARCELA GERADA"
    },
    {
    "numeroParcela": "2",
    "valorParcela": 120000.20,
    "dataVencimento": "2021-03-21",
    "dataEmissao": "2021-01-21",
    "numeroLinhaDigitavel": "34191092060023598295680002060004687700002288835",
    "numeroCodigoBarras": "34196877000022888351092000235982958000206000",
    "historico": "PARCELA GERADA"
    },
    {
    "numeroParcela": "3",
    "valorParcela": 120000.20,
    "dataVencimento": "2021-04-21",
    "dataEmissao": "2021-01-21",
    "numeroLinhaDigitavel": "34191092060023598295680002060004687700002288835",
    "numeroCodigoBarras": "34196877000022888351092000235982958000206000",
    "historico": "PARCELA GERADA"
    }
    ],
    "boletoOrigem": [
    {
    "erpId": "T1|D MG 01 ||20210121A||NF|000001|01"
    }
    ]
    }
    ],
    "alterados": []
    }
    },
    {
    "cnpj": "20412968000132",
    "boletos": {
    "pagos": [
    {
    "platformId": "6",
    "erpId": "T2|D MG 01 ||20210121C||NF|TST001|01",
    "dataMovimento": "2021-01-21",
    "valor": 450000,
    "historico": "BOLETO PAGO"
    }
    ],
    "gerados": [
    {
    "platformId": "99999900000000002",
    "numeroTransacao": "200000002",
    "valorTotal": 480000.60,
    "juros": 30000.6,
    "parcelas": [
    {
    "numeroParcela": "1",
    "valorParcela": 240000.30,
    "dataVencimento": "2021-02-22",
    "dataEmissao": "2021-01-21",
    "numeroLinhaDigitavel": "34191092060023598295680002060004687700002288835",
    "numeroCodigoBarras": "34196877000022888351092000235982958000206000",
    "historico": "PARCELA GERADA"
    },
    {
    "numeroParcela": "2",
    "valorParcela": 240000.30,
    "dataVencimento": "2021-03-22",
    "dataEmissao": "2021-01-21",
    "numeroLinhaDigitavel": "34191092060023598295680002060004687700002288835",
    "numeroCodigoBarras": "34196877000022888351092000235982958000206000",
    "historico": "PARCELA GERADA"
    }
    ],
    "boletoOrigem": [
    {
    "erpId": "T2|D MG 01 ||20210121C||NF|TST001|01"
    }
    ]
    }
    ],
    "alterados": []
    }
    }
    ]

    Para Habilitar os Log´s no Console.Log, é necessário incluir no Appserver.Ini a seguinte linha na Sessão Environment, conforme MP - ADVPL - Como Ativar a função FWLogMsg. – Central de Atendimento TOTVS

    FWLOGMSG_DEBUG = 1