Páginas filhas
  • Integrations TECHFIN

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

Integrations TECHFIN

Image RemovedImage Added


Índice

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.

02. PRODUCTS

...

Deck of Cards
idCenario
effectTypefade
Card
id1
labelWizard de Configuração
effectTypefade
Expandir
titleWizard de Configuração

To start the Configuration Wizard, enter WizardTF1 in the homepage

...


Image Added

Click OK

...

Image Added

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

...


Image Added

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

...

Image Added

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

...

Image Added

Accept parameters sharing verification

...


Image Added

Enter ClientID and Client Secret, sent by Techfin

Complete the parameters according to as requested.

...


Image Added






Card
id1
labelTOTVS Antecipa
effectTypefade

For further information on the TOTVS

...

Financial Panel integration, refer to this link:

Integration Protheus x TOTVS

...

  • 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:
  • FINA137E.PRW  (In charge of requesting the TOKEN to Carol)
  • FINA137F.PRW  (In charge of the JOB receiving the Json with the bills to be posted/added or edited)
  • FINA137G.PRW (In charge of submitting the POST in the platform to inform the bills were properly operated in Protheus)
  • FINXAPI.PRW    (In charge of the Posting Payment/Generation of Bills and Editing Bills routines)

Technical Information
FINXAPI.PRW
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

...

Financial Panel

Card
id1
labelTOTVS Painel Financeiro
effectTypefade

Para maiores informações sobre a integração do TOTVS Painel Financeiro, consulte o link a seguir:

Integração Protheus x TOTVS Painel Financeiro

Card
labelTOTVS Mais Prazo
Expandir
titleImplantação

Para iniciar a implementação do TOTVS Mais Prazo será necessário:

1) Aplicar a última expedição continua do Protheus, juntamente com o diferencial de dicionário através do UPDDISTR, de acordo com a sua versão da Release. 

2) Efetuar os cadastros dos seguintes Itens:

  • Fornecedor Supplier;
  • Natureza Financeira; 
  • Motivo de Baixa que não movimenta banco e carteira pagar (P)

3)

...

 Executar o wizard de acordo com os passos conforme a aba Wizard de Configuração

Expandir
titleOperação

A operação consiste em agendar a execução pelo FINA137F, que é o JOB responsável por requisitar as movimentações junto a TechFin e executá-las no Protheus. 

Fluxo das operações:

1)  O JOB FINA137F com agendamento e periodicidade de 1 em 1 hora, fará uma requisição junto ao TechFin para receber a mensagem, contendo as movimentações a serem executadas no Protheus. O cliente poderá ajustar sua periodicidade, no entanto, recomendamos nunca aumentar demasiadamente esse intervalo, afim de manter o portal da Techfin, o mais sincronizado possível com o Protheus

2) Após a movimentação feita no Protheus, o sistema enviará a Techfin que as operações foram realizadas no Protheus. Mantendo assim o Protheus e o Portal Techfin, sincronizados.

3) Os títulos que poderão ser negociados são os que possuem código de barras cadastrados. 

Expandir
titleBaixa de Titulos

A Baixa dos Titulos será realizada com o motivo de baixa configurada no Wizard, lembrando que o Motivo de Baixa, não movimenta banco, por essa razão essa baixa não será exibida no extrato bancário. Seu historico será enviado pela Plataforma. 


Image Added

Essa baixa não movimentará banco, observe que o motivo de baixa é TEC, a mesma escolhida no wizard cadastrada previamente, com a opção Movimenta Banco = "N", o Historico "BOLETO PAGO" é enviado pela Techfin, a data de baixa é a data de processamento. 



Expandir
titleInclusões de Novos Titulos

A Inclusão dos novos títulos, será efetuada conforme a negociação realizada no portal Techfin, os valores já serão inseridos com os Juros embutidos. Assim como as datas de vencimentos acordadas. Os códigos de barras já serão disponibilizados devidamente cadastrados no titulo. 

Observe o rastreio dos títulos e seus desdobramentos conforme as imagens. 


Image Added



Image Added

Expandir
titleProrrogação das Parcelas

Será possível a prorrogação dos títulos que foram negociados previamente. 

As solicitações de prorrogação serão incluídas assim que estiver liberado pelo Portal Techfin. 

Serão alteradas as parcelas solicitadas com novas datas de vencimentos, novos códigos de barras e acrescidas de juros negociados.

Os Juros estão sendo incluídos via Valores Acessórios - FKD, com o código escolhido no momento do Wizard.


Image Added



Expandir
titleTabelas e Parâmetros Envolvidos

As Tabelas Envolvidas:

  • SE2 - Tabelas de Contas a Pagar
  • SE5 - Tabela de Movimentação Bancária
  • FI8 - Tabela de Naturezas Financeiras
  • FKC - Códigos Valores Acessórios
  • FKD - Titulos x Valores Acessórios

Parametros Envolvidos:

  • MV_PRETECF – Prefixo dos Titulos negociados, deverá conter o prefixo dos títulos a favor da Supplier
  • MV_TPTECF – Tipo de Titulos negociados, deverá contém o tipo de título dos títulos a favor da Supplier
  • MV_NTTECF – Natureza de títulos Negociados, deverá conter a natureza financeira cadastrada para os títulos em favor da Supplier
  • MV_FNTECF – Fornecedor de Titulos negociados, deverá conter o codigo do fornecedor cadastrado para os títulos em favor da Supplier
  • MV_LFTECF – Loja do fornecedor negociados, deverá conter o codigo da loja do fornecedor cadastrado para os títulos em favor da Supplier
  • MV_MBXTECF - Codigo do Motivo de Baixa, dos títulos que foram antecipados.
  • MV_VATECF – Código dos valores acessórios, dos títulos negociados em favor da Supplier, que sofreram pedido de prorrogação

**** Importante: O Compartilhamento dos parâmetros devem ser observados de acordo com a estrutura do cliente, sugerimos que os códigos de Fornecedores e Naturezas sejam os mesmos, em todas as filiais, no entanto, caso isso nao seja possivel, deverá ser tratado de forma exclusiva.


Fontes Envolvidos:

  • FINA137E.PRW  (Resnponsável pela requisição do TOKEN junto a Carol)
  • FINA137F.PRW  (Responsável pelo JOB que recebe o Json com os titulos a serem baixados / incluidos ou alterados)
  • FINA137G.PRW (Responsável para envio do POST na plataforma para informar que os titulos foram devidamente movimentados no Protheus)
  • FINXAPI.PRW    (Responsavel pelas rotinas de Baixa / Geração de Titulos e Alteração dos titulos)
Expandir
titleInformações Técnicas
Expandir
titleFINXAPI.PRW

Com a movimentação em mãos, será chamada as seguintes funções: 

  • FaBaixaCp() para baixar os titulos informados

  • FaIncSE2() para incluir os titulos novos

  • FaAltSE2() para alterar os titulos prorrogados

Expandir
titleAppserver.ini

Após rodar o Wizard, essas tag´s serão acrescidas no appserver.ini

Na sessão Environment

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

...

Expandir
titleJson Techfin- TOTVS Mais Prazo

[
{
"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":

...

[

...

]

...


}

...


}

...


]

Expandir
titleHabilitar a Geração de Log´s

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



HTML
<!-- esconder o menu --> 


<style>
div.theme-default .ia-splitter #main {
    margin-left: 0px;
}
.ia-fixed-sidebar, .ia-splitter-left {
    display: none;
}
#main {
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
}

.aui-header-primary .aui-nav,  .aui-page-panel {
    margin-left: 0px !important;
}
.aui-header-primary .aui-nav {
    margin-left: 0px !important;
}
</style>