3 Integration

Integration Diagram

Retail Fiscal Management Integration Overview

Retail Fiscal Management Cloud Service integration flows comprise a set of REST services that support the configuration of fiscal attributes and the fiscal classification of items and entities, as well as the services that support the receiving and generation of fiscal documents.

In addition to these services, the Merchandising Foundation data subscription APIs also have extensions that allow the creation of foundation data already associated with fiscal attributes. The Merchandising APIs with this extension are:

Item Subscription API: This API subscribes to items from external systems to create, update or delete items in Merchandising. It also supports the insertion of data into the Item Induction staging tables.

Item Location Subscription API: This API subscribes to item/location data from external systems to create or modify item location combinations in Merchandising. Item/location relationships are created for an item and a single location, or by using one of the levels of the organizational hierarchy.

Store Subscription API: The Store Subscription API provides the ability to keep store data in Merchandising in sync with an external system if Merchandising is not being used as the system of record for organizational hierarchy information. The store data handled by the API includes basic store data, in addition to addresses, store hours, location traits, up-charges, and walk-through stores.

Vendor Subscription API (Suppliers and Partners): Merchandising subscribes to vendor information that is published from an external financial application; however, this API is not used by Oracle Retail Financial Integration (RFI). “Vendor” can refer to either a partner or a supplier.

ReSTful Web Services

Create or Update Fiscal Attributes Service

This section describes the Fiscal Data Management Services

Functional Area

Fiscal Management

Business Overview

This service creates or updates fiscal attributes and their parameters. It is published to support the creation of user-defined fiscal attributes and includes a parameter for action with possible values of create (NEW) or update (MOD).

Service Type

Post

ReST URL
{{baseUrl}}/services/private/fdm/fiscalAttributes/create?action=xxx
Input
Parameter Name Required Data Type Description Valid values

action

Yes

String

Requested action.

NEW, MOD

attributes

Yes

List<RestRfmFdmSetFa>

Collection of Attributes.

 

Table 3-1 RestRfmFdmSetFa

Parameter Name Required Data Type Description Valid values

code

Yes

String

User-defined code for the attribute in snake case format. This code is normally the “name” of the attribute. For example, TAX_PAYER_TYPE

 

camelCase

Yes

String

User-defined code for the attribute in camel case format. The camel case format is used when associating the attribute to JSON and/or XML data structures used in RFMCS. For example, taxPayerType

 

label

Yes

String

Contains the name of the attribute displayed on Fiscal Data Management Screens.

 

description

Yes

String

Contains the description of the attribute displayed on Fiscal Data Management Screens.

 

template

Yes

String

Merchandise entity with which the attribute is associated

ITEM_MASTER,ITEM_LOC, ITEM_SUPPLIER,LOCATION,SUPS, PARTNER

country

Yes

String

Country code from COUNTRY table in Merchandising

 

effectiveFromDate

No

Date

Date from when the attribute is made available

 

effectiveToDate

No

Date

Date until when the attribute is made available.

 

systemBehavior

No

String

Indicates a system behavior is applied based on this attribute. The system behaviors associated to fiscal attributes are defined in RFMCS for each workflow/transaction. This parameter is used as a filter for these behaviors to be applied.

Y or N

fiscalDocumentUse

No

String

Indicates the attribute is used in fiscal reporting scenarios as additional information to be included. RFMCS data is made available for fiscal reporting and fiscal attributes with this parameter and is automatically included in the set of data to be exposed.

Y or N

taxCalculation

No

String

Indicates the attribute is used in tax calculation scenarios as additional information to be included. The tax calculation scenario under the scope of RFMCS automatically fetches fiscal attributes with this parameter and includes in the tax request payloads made available for taxation integration.

Y or N

fiscalReporting

No

String

Indicates the attribute is used in fiscal reporting scenarios as additional information to be included. RFMCS data is made available for fiscal reporting and fiscal attributes with this parameter and is automatically included in the set of data to be exposed.

Y or N

userDefinedInd

No

String

Indicates the attribute is user-defined.

Y or N

groupCode

Yes

String

Code from the group code list. It is used to group attributes on Fiscal Data Management screens

1 – Fiscal Codes, 2 – System Behavior, 3 – Tax Inscriptions, 4 – User defined

screenSeq

Yes

Number

The numeric sequence used to order the fiscal attributes on Fiscal Data Management screens. It is recommended to extract the existing attributes, if any, before determining the sequence of new attributes.

 

mandatory

Yes

String

Indicates the attribute is mandatory. All mandatory attributes are required to be included in the association to entities or items for them to be considered ready to use or to be displayed with the green status of “with attributes” on Fiscal Data Management screens.

Y or N

dataType

Yes

String

Attribute data type

VARCHAR, NUMBER, DATE

dataLength

Yes

String

Attribute data length

 

attributeType

No

String

Attribute type to indicate if the attribute has a list of values or if it has a fixed value:

DATALIST: list of codes provided externally (NCM, CEST codes)

FIXVALUE: value to be informed that doesn´t belong to any list

listSource

No

String

If the attribute type is DATALIST, the source of the list must be included in this parameter.

MFCS (when the list is a table/column in Merchandising), INTERNAL (when the list has a set of codes defined internally for the application), EXTERNAL (when the list has a set of codes provided by external sources such as legal authorities or third-party partners)

listCode

No

String

If the attribute type is DATALIST, and the list source is INTERNALor EXTERNAL, the list name must be included in this parameter. The content of the list of values is managed by the Create and Modify Fiscal Attribute List service.

 

listTableName

No

String

If the attribute type is DATALIST and the list source is MFCS, this parameter must have the name of the Merchandising table from which the list of values is fetched.

 

listCodeColumn

No

String

If the attribute type is DATALIST and the list source is MFCS, this parameter must have the name of the column from the Merchandising table included.

 

listDescColumn

No

String

If the attribute type is DATALIST and the list source is MFCS, this will indicate the table column name from where the attribute description is fetched in the Merchandising database.

 

parentAttribCode

No

String

Code of the parent attribute. This parameter allows the association between attributes in a hierarchical mode. Attributes with this association depend on the parent attribute to be selected for the child attribute to be applied on Fiscal Data Management Screens.

 

functionValidation

No

String

Name of the function which has validation logic to be applied during the fiscal classification while choosing the attribute. This parameter allows only a pre-defined set of functions to be included. Anything different from those functions is ignored. Refer to the “List of Functions Available for the functionValidation Parameter” table for a list of available functions.

 

levelValidation

No

String

SQL condition to be executed to allow the selection of the attribute. For example, ATTRIBUTE1 = ‘Y’. In this case, the attribute being configured is available for the fiscal classification only if another attribute name ATTRIBUTE1 has the value Y already present in the current item or entity. Only simple condition rules are supported for this parameter. The validation for this parameter considers a query for the item/entity being classified and a WHERE clause where the content of this attribute is executed.

 

uniqueInd

Yes

String

Indicates the attribute value is unique and cannot be repeated in any item or entity. It is possible that the same attribute may be repeated for the same item/entity with different values, but if this parameter is set to Y (yes) only one value is allowed for the attribute to a given item/entity.

Y or N

Table 3-2 List of Functions Available for the functionValidation Parameter

Function Name Country Description

rfm_fdm_val_fiscal_content_sql.validate_cnpj_digit

BR

Digit calculation for BR corporate taxpayer ID

rfm_fdm_val_fiscal_content_sql.validate_cpf_digit

BR

Digit calculation for BR individual taxpayer ID

rfm_fdm_val_fiscal_content_sql.validate_ie

BR

Digit calculation for state inscription ID based on Fiscal Address

rfm_fdm_val_fiscal_content_sql.validate_ie_ac

BR

Digit calculation for state inscription in the state of Acre-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_al

BR

Digit calculation for state inscription in the state of Alagoas-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_am

BR

Digit calculation for state inscription in the state of Amazonas-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_ap

BR

Digit calculation for state inscription in the state of Amapa-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_ba

BR

Digit calculation for state inscription in the state of Bahia-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_ce

BR

Digit calculation for state inscription in the state of Ceara-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_df

BR

Digit calculation for state inscription in the Federal District-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_es

BR

Digit calculation for state inscription in the state of Espirito Santo-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_go

BR

Digit calculation for state inscription in the state of Goias-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_ma

BR

Digit calculation for state inscription in the state of Maranhao-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_mg

BR

Digit calculation for state inscription in the state of Minas Gerais-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_ms

BR

Digit calculation for state inscription in the state of Mato Grosso do Sul-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_mt

BR

Digit calculation for state inscription in the state of Mato Grosso-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_pa

BR

Digit calculation for state inscription in the state of Para-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_pb

BR

Digit calculation for state inscription in the state of Paraiba-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_pe

BR

Digit calculation for state inscription in the state of Pernambuco-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_pi

BR

Digit calculation for state inscription in the state of Piaui-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_pr

BR

Digit calculation for state inscription in the state of Parana-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_rj

BR

Digit calculation for state inscription in the state of Rio de Janeiro-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_rn

BR

Digit calculation for state inscription in the state of Rio Grande do Norte-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_ro

BR

Digit calculation for state inscription in the state of Rondonia-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_rr

BR

Digit calculation for state inscription in the state of Roraima-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_rs

BR

Digit calculation for state inscription in the state of Rio Grande do Sul-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_sc

BR

Digit calculation for state inscription in the state of Santa Catarina-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_se

BR

Digit calculation for state inscription in the state of Sergipe-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_sp

BR

Digit calculation for state inscription in the state of Sao Paulo-BR

rfm_fdm_val_fiscal_content_sql.validate_ie_to

BR

Digit calculation for state inscription in the state of Tocantins-BR

JSON Input Structure

"{
     "code": "ABRANGENCIA",
      "camelCase": "abrangencia",
      "label": "Abrangencia",
      "description": "Abrangencia do Item (valido: N - Nacional; E - Estadual; M - Municipal",
      "template": "ITEM_MASTER",
      "country": "BR",
      "availabilityStatus": "ACTIVE",
      "effectiveFromDate": "2023-05-16T00:00:00.000Z",
      "effectiveToDate": "",
      "systemBehavior": null,
      "fiscalDocumentUse": null,
      "taxCalculation": null,
      "fiscalReporting": null,
      "userDefinedInd": "N",
      "groupCode": "1",
      "screenSeq": "14",
      "required": "Y",
      "mandatory": "Y",
      "dataType": "VARCHAR",
      "dataLength": "1",
      "attributeType": "DATALIST",
      "listSource": "FDM",
      "listCode": "itemAbrangenciaList",
      "listTableName": null,
      "listCodeColumn": null,
      "listDescColumn": null,
      "parentAttribCode": "",
      "functionValidation": "",
      "levelValidation": "",
      "uniqueInd": "Y"
   }"
Output
Parameter Name Data Type Description

status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

errors

List<RestRfmFdmError>

Collection of errors.

Table 3-3 RestRfmFdmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

JSON Structure

"{
   "status": "S",
   "errors": null
}"
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FDM_SET_FA

Yes

Yes

Yes

No

COUNTRY

Yes

No

No

No

RFM_FDM_LIST

Yes

No

No

No

Create or Update Fiscal Attribute Lists Service

Functional Area

Fiscal Management

Business Overview

This service creates or updates the valid list of codes associated with a previously created fiscal attribute.

The service has a parameter for action with the possible values create (NEW) or update (MOD).

Service Type

Post

ReST URL
{{baseUrl}}/services/private/fdm/fiscalAttributesLists/create?action=xxx
Input
Parameter Name Required Data Type Description Valid values

action

Yes

String

Requested action.

NEW, MOD

attributes

Yes

List<RestRfmFdmList>

Collection of Attributes List.

 

Table 3-4 RestRfmFdmList

Parameter Name Required Data Type Description Valid values

codeType

Yes

String

Indicates the code of the list. This is the same code included in the Fiscal Attributes Creation service in the parameter listCode.

 

code

Yes

String

Indicates the code of the attribute value in the list. If the list has values from 1 to 10, this parameter holds the value 1 and it is repeated up to 10.

 

codeDesc

Yes

String

Contains the description of the value informed.

 

codeSeq

Yes

Number

Contains the numeric sequence of the values in the list. This parameter always starts with 1 and goes up to the last value created.

 

parentCodeType

No

String

Name of the parent list code. This parameter allows the association between attribute lists in a hierarchical mode. Lists with this association depend on the parent list selected for the child list to be applied on Fiscal Data Management Screens.

 

parentCode

No

String

Code of the parent list value. This parameter allows the association between list values in a hierarchical mode. Attributes with this association depend on the parent list value selected for the child attribute to be applied on Fiscal Data Management Screens.

 

userDefinedInd

Yes

String

Indicates the attribute is user-defined.

Y or N

effectiveFromDate

No

OffsetDateTime

Date from when the attribute is made available.

 

effectiveToDate

No

OffsetDateTime

Date until when the attribute is made available.

 

JSON Input Structure

"{
      "codeType": "itemAbrangenciaList",
      "code": "H",
      "codeDesc": "Test Doc FDM Services",
      "codeSeq": 4,
      "parentCodeType": "",
      "parentCode": "",
      "userDefinedInd": "N",
      "effectiveFromDate": "2023-05-16T13:25:23.525Z",
      "effectiveToDate": "2023-05-16T13:25:23.525Z"

}"
Output
Parameter Name Data Type Description

status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

errors

List<RestRfmFdmError>

Collection of errors.

Table 3-5 RestRfmFdmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

JSON Structure

"{
   "status": "S",
   "errors": null
}"
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FDM_LIST

Yes

Yes

Yes

No

Fiscal Reclassification Request Service

Functional Area

Fiscal Management

Business Overview

This service performs fiscal classification or reclassification.

It associates fiscal attributes with items and entities and has a parameter for the requested source with the possible values MFCS, UI and Webservice

Service Type

Post

ReST URL
{{baseUrl}}/services/private/fdm/reclass/create?requestSource=xxx
Input
Parameter Name Required Data Type Description Valid values

requestSource

Yes

String

Reclass origin: MFCS - Indicates the reclass came from RIB, UI - Reclass came from FDM UI, Webservice - Reclass came from webservice call.

MFCS, UI and Webservice.

attributes

Yes

List<RestRfmFdmFiscRecl>

Collection of SVC_RFM_FISCAL_RECLASS data.

 

Table 3-6 RestRfmFdmFiscRecl

Parameter Name Required Data Type Description Valid values

reclassId

Yes

Number

For modify or delete actions, the referenced reclass ID must be sent. Not required for new records.

 

seqNo

Yes

Number

For modify or delete actions, the referenced reclass sequence number must be sent. Not required for new records.

 

reclassAction

Yes

String

Drives the process of the service in FDM.

NEW – Add new records,

MOD – Update existing records,

DEL – delete existing records (only non-processed records)

NEW

MOD

DEL

reclassTemplate

Yes

String

Determines the structure with which the attribute is made available. Valid values:

ITEM_MASTER, ITEM_LOC, ITEM_SUPPLIER, LOCATION, SUPS, PARTNER

country

Yes

String

Country code from COUNTRY table in Merchandising

 

item

No

String

For ITEM_MASTER: this key must have the item code

For ITEM_LOC: this key must have the item code

For ITEM_SUPPLIER: this key must have the item code

For LOCATION: not applied

For SUPS: not applied

For PARTNER: not applied

 

loc

No

String

For ITEM_MASTER: not applied

For ITEM_LOC: not applied

For ITEM_SUPPLIER: not applied

For LOCATION: this key must have the location code

For SUPS: not applied

For PARTNER: not applied

 

locType

Yes

String

For ITEM_MASTER: not applied

For ITEM_LOC: this key must have the location type (S, W)

For ITEM_SUPPLIER: not applied

For LOCATION: this key must have the location type (S, W)

For SUPS: not applied

For PARTNER: not applied

 

sups

No

String

For ITEM_MASTER: not applied

For ITEM_LOC: not applied

For ITEM_SUPPLIER: not applied

For LOCATION: not applied

For SUPS: this key must have the supplier site code

For PARTNER: not applied

 

partner

No

String

For ITEM_MASTER: not applied

For ITEM_LOC: not applied

For ITEM_SUPPLIER: not applied

For LOCATION: not applied

For SUPS: not applied

For PARTNER: this key must have the partner code

 

partnerType

No

String

For ITEM_MASTER: not applied

For ITEM_LOC: not applied

For ITEM_SUPPLIER: not applied

For LOCATION: not applied

For SUPS: not applied

For PARTNER: this key must have the partner type

 

attribute

Yes

String

Attribute code. Must be an existing and active attribute.

 

attribValue

Yes

String

Attribute value. Must be an existing and active attribute value.

 

startDate

Yes

String

Date from when the attribute association is made available

 

endDate

No

String

Date from when the attribute association is made available

 

JSON Input Structure

"{
   "reclassAction": "NEW",
   "reclassStatus": "N",
   "country": "BR",
   "reclassTemplate": "SUPS",
   "item": "100000260",
   "loc": null,
   "locType": null,
   "sups": 790011,
   "partner": null,
   "partnerType": null,
   "attribValue": "S",
   "attribute": "PESSOA_JURIDICA",
   "startDate": "2023-05-16",
   "endDate": ""
}"
Output
Parameter Name Data Type Description

status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

errors

List<RestRfmFdmError>

Collection of errors.

Table 3-7 RestRfmFdmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

JSON Structure

"{
   "status": "S",
   "errors": null
}"
Table Impact
TABLE SELECT INSERT UPDATE DELETE

SVC_RFM_FDM_FISCAL_RECLASS

Yes

Yes

Yes

Yes

RFM_WFLW_ERR

Yes

No

No

No

Fiscal Attributes Request Service

Functional Area

Fiscal Management

Business Overview

This service exports fiscal classification data for items and entities.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/fdm/fiscalAttributes/get?entity=<string>&country=<string>&groupCode=<string>
Input Parameters
Parameter Name Required Data Type Description Valid values

entity

Yes

String

Template of fiscal attribute association

ITEM_MASTER, ITEM_LOC, ITEM_SUPPLIER, LOCATION, SUPS, PARTNER

country

No

String

Country ID.

 

groupCode

No

Number

Group code for fiscal attributes.

 
Output
Parameter Name Data Type Description

code

String

User-defined code for the attribute in snake case format.

camelCase

String

User-defined code for the attribute in camel case format.

label

String

Attribute label displayed on FDM screens.

description

String

Attribute label displayed on FDM screens.

template

String

Merchandise entity with which the attribute is associated.

country

String

Country code from COUNTRY table in Merchandising.

effectiveFromDate

OffsetDateTime

Date from when the attribute is made available.

effectiveToDate

OffsetDateTime

Date until when the attribute is made available.

systemBehavior

String

Indicates the attribute has an impact on a specific system behavior or functionality.

fiscalDocumentUse

String

Indicates the attribute is used in fiscal document generation processes as additional information to be included.

taxCalculation

String

Indicates the attribute is used in tax calculation scenarios as additional information to be included.

fiscalReporting

String

Indicates the attribute is used in fiscal reporting scenarios as additional information to be included.

userDefinedInd

String

Indicates the attribute is user-defined

groupCode

String

Code from the group code list. It is used to group attributes on FDM screens.

screenSeq

Number

Numeric sequence used to order the fiscal attributes on FDM screens.

mandatory

String

Indicates the attribute is mandatory.

dataType

String

Attribute data type.

dataLength

String

Attribute data length.

attributeType

String

Attribute type to indicate if the attribute has a list of values or if it has a fixed value.

listSource

String

Source of the list of values.

listCode

String

Name of the list of values.

listTableName

String

If the source list is MFCS, this indicates the table name in the Merchandising database.

listCodeColumn

String

If the source list is MFCS, this indicates the table column name from which the attribute code is fetched in the Merchandising database.

listDescColumn

String

If the source list is MFCS, this indicates the table column name from which the attribute description is fetched in the Merchandising database.

parentAttribCode

String

Code of the parent attribute.

functionValidation

String

Name of the function that has the validation logic. This field is used for specific blocks of code applied to the attribute when being processed, created, or associated with entities during the Reclass process.

levelValidation

String

Conditional validation rules. It is configured based on code, operator, and value.

uniqueInd

String

Indicates the attribute value is unique and cannot be repeated in any item or entity.

JSON Structure

"{
   "code": "PESSOA_JURIDICA",
   "camelCase": "pessoaJuridica",
   "label": "Corporate Taxpayer Ind",
   "description": "Corporate taxpayer indicator.",
   "template": "SUPS",
   "country": "BR",
   "effectiveFromDateDisplay": "16-May-2023 13:58:14",
   "effectiveFromDate": 1684245494000,
   "effectiveToDate": null,
   "systemBehavior": null,
   "fiscalDocumentUse": null,
   "taxCalculation": "Y",
   "fiscalReporting": "Y",
   "userDefinedInd": "N",
   "groupCode": "1",
   "screenSeq": 1,
   "mandatory": "Y",
   "dataType": "VARCHAR",
   "dataLength": "1",
   "attributeType": "DATALIST",
   "listSource": "INTERNAL",
   "listCode": "simOuNaoLista",
   "listTableName": null,
   "listCodeColumn": null,
   "listDescColumn": null,
   "parentAttribCode": null,
   "functionValidation": null,
   "levelValidation": null,
   "uniqueInd": "N"
}"
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FDM_SET_FA

Yes

No

No

No

RFM_FDM_SET_FA_TL

Yes

No

No

No

Fiscal Attributes Lists Request Service

Functional Area

Fiscal Management

Business Overview

This service exports fiscal attribute lists.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/fdm/fiscalAttributesLists/get?template=<string>&attribCode=<string>&attribList=<string>&attribListValue=<string>
Input Parameters
Parameter Name Required Data Type Description Valid values

template

Yes

String

Template of fiscal attribute association.

ITEM_MASTER, ITEM_LOC, ITEM_SUPPLIER, LOCATION, SUPS, PARTNER

attribCode

Yes

String

Attribute Code.

 

attribList

No

String

Attribute list code.

 

attribListValue

No

String

Attribute list code value.

 
Output
Parameter Name Data Type Description

O_response

List<RestRfmFdmAttribLst>

Collection of List.

Parameter Name Data Type Description

code

String

This field contains the code used in Oracle Retail which can be decoded.

code_desc

String

This field contains the description associated with the code and code type.

Label

String

Field label for screen representation (UI).

Table 3-8 RestRfmFdmAttribLst

Parameter Name Required Data Type Description

codeType

Yes

String

Indicates the code of the list. This is the same code included in the Create or Update Fiscal Attributes Service parameter listCode.

code

Yes

String

Indicates the code of the attribute value in the list. If the list has values from 1 to 10, this parameter holds the value 1 and it is repeated up to 10.

codeDesc

Yes

String

Contains the description of the value informed.

codeSeq

Yes

Number

Contains the numeric sequence of the values in the list. This parameter always starts with 1 and goes up to the last value created.

parentCodeType

No

String

Name of the parent list code. This parameter allows the association between attribute lists in a hierarchical mode. Lists with this association depend on the parent list selected for the child list to be applied on Fiscal Data Management Screens.

parentCode

No

String

Code of the parent list value. This parameter allows the association between list values in a hierarchical mode. Attributes with this association depend on the parent list value selected for the child attribute to be applied on Fiscal Data Management Screens.

userDefinedInd

Yes

String

Indicates the attribute is user-defined.

effectiveFromDate

No

OffsetDateTime

Date from when the attribute is made available.

effectiveToDate

No

OffsetDateTime

Date until when the attribute is made available.

JSON Structure

{
  "items": [
    {
      "codeType": "NCMList",
      "code": "01",
      "codeDesc": "Live animals.",
      "codeSeq": 1,
      "parentCodeType": null,
      "parentCode": null,
      "userDefinedInd": "N",
      "effectiveFromDateDisplay": "12-Dec-2024 18:13:13",
      "effectiveFromDate": 1734027193000,
      "effectiveToDate": null
    },
    {
      "codeType": "NCMList",
      "code": "0101",
      "codeDesc": "Horses, horses and muars, alive.",
      "codeSeq": 2,
      "parentCodeType": null,
      "parentCode": null,
      "userDefinedInd": "N",
      "effectiveFromDateDisplay": "12-Dec-2024 18:13:13",
      "effectiveFromDate": 1734027193000,
      "effectiveToDate": null
    }
  ],
  "hasMore": true,
  "limit": 2,
  "count": 2,
  "totalRecordCount": 15071
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FDM_SET_FA

Yes

No

No

No

RFM_FDM_SET_FA_TL

Yes

No

No

No

RFM_FDM_LIST

Yes

Yes

No

No

RFM_FDM_LIST_TL

Yes

No

No

No

SVC_RFM_FDM_FISCAL_RECLASS

Yes

Yes

No

No

RFM_FDM_ATTRIB_ITEM

Yes

No

Yes

No

Process Flex Integration Create Service

Functional Area

Fiscal Management

Business Overview

This service creates or updates fiscal documents in the RFMCS Fiscal Document Management feature.

Service Type

Post

ReST URL
{{baseUrl}}/services/private/flx/integration/create
Input
Parameter Name Required Data Type Description Valid values

intPrefix

Yes

String

Document`s Workflow Scenario code.

 

intVersion

Yes

String

Integration Flow Version number.

 

intRelease

Yes

String

Integration Flow release number.

 

intCode

No

Number

Internal unique ID for the integration record.

 

intCodeRef

No

Number

Reference integration ID for the integration record used in response flows.

 

intRequestSystem

No

String

This field contains the identification name of system that is requesting the integration.

 

intRequestCode

No

String

This field contains the identification code of system that is requesting the integration.

 

intKeys

No

intKeys

Group of data with status and attributes of the integration record.

 

intBody

Yes

String

Payload of the document or document data in scope for the integration scenario.

 

The flxIntegration/IntKeys node has the following parameters:

Table 3-9 IntKeys

Parameter Name Required Description Valid values

Status

Yes

   

msgAttributes

No

attribCode/attribValue structure to provide additional information.

 

The flxIntegration/intKeys/msgAttributes node has the following parameters:

Table 3-10 msgAttributes

Parameter Name Required Description Valid values

attribCode

No

   

attribValue

No

   

errors

No

Collection of errors

 

The flxIntegration/intKeys/msgAttributes/errors node has the following parameters:

Table 3-11 errors

Parameter Name Required Description Valid values

errorCode

No

This field contains the error code.

 

errorDesc

No

This field contains the error description.

 

XML Input Structure:

Example for the workflow POFDR, scenario processDocumentReceive that creates a fiscal document in RFMCS for fiscal receiving based on the Brazilian NFE invoice.

 <?xml version="1.0" encoding="UTF-8"?>
<flxIntegration xmlns="http://www.oracle.com/retail/flx/integration/v1">
  <intPrefix>poFiscalDocumentReceive</intPrefix>
  <intVersion>1</intVersion>
  <intRelease>24.0.101</intRelease>
  <intCode>sourceSystemInternalId</intCode>
  <intCodeRef/>
  <intRequestSystem>supplierSystem</intRequestSystem>
  <intRequestCode>97987987987</intRequestCode>
  <intKeys/>
  <intBody>BrazilianNFExmlCompletePayload</intBody>
</flxIntegration>
Output
Parameter Name Data Type Description

Record

RestRfmOpInt

Output of operation.

Table 3-12 RestRfmOpInt

Parameter Name Data Type Description

Status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

intId

Number

Unique document code.

docId

Number

Document ID.

wfStatusCode

String

Processing status. Valid values are (START, SUCCESS, FAIL, WARNING).

wfStatusDesc

String

Description of the processing status (wfStatusCode).

errors

List<RestRfmError>

Collection of errors.

Table 3-13 RestRfmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

seqNo

Number

Error sequence number.

XML Structure

Example for the workflow POFDR

<Record>
  <status>E</status>
  <intId>2886</intId>
  <docId>914</docId>
  <wfStatusCode>ERROR</wfStatusCode>
  <wfStatusDesc>Deduce Key Data Technical Exception</wfStatusDesc>
  <errors>
    <item>
      <errorCode>PACKAGE_ERROR</errorCode>
      <errorDesc>User <username> does not have required access to perform changes to location 8801. Please contact an administrator user.</errorDesc>
      <seqNo/>
    </item>
  </errors>
</Record>
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_CODE_DETAIL

Yes

No

No

No

RFM_CODE_DETAIL_TL

Yes

No

No

No

RFM_WFLW_ERR

Yes

No

No

No

RFM_WFLW_SET

Yes

No

No

No

RFM_WFLW_STA_LOG

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR

Yes

Yes

Yes

Yes

RFM_WFLW_DEF

Yes

No

No

No

RFM_FLX_DOC_FDG

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR_HIST

Yes

Yes

Yes

No

RFM_FLX_DOC_FDG_HIST

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDR_DATA_XML

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDR_DATA_XML_HIST

No

Yes

Yes

Yes

RFM_FLX_DOC_FDG_DATA

No

No

No

Yes

RFM_FLX_DOC_FDG_DATA_XML_HIST

No

Yes

Yes

Yes

RFM_FLX_DOC_FDG_DATA_XML

No

Yes

Yes

Yes

RFM_FLX_DOC_FDG_DATA_JSON

No

Yes

Yes

No

RFM_FLX_DOC_FDG_DATA_JSON_HIST

No

Yes

Yes

Yes

RFM_FLX_DOC_FDR_DATA_JSON

No

Yes

Yes

Yes

RFM_FLX_DOC_FDR_DATA_JSON_HIST

No

Yes

Yes

No

RFM_WFLW_SET_VAR

Yes

No

No

No

RFM_WFLW_EXEC_VAR

Yes

No

No

No

RFM_WFLW_SET_ACTION

Yes

No

No

No

RFM_FLX_SET_CONTENT

Yes

No

No

No

RFM_USER_LOCATION

Yes

No

No

No

RFM_FLX_DOC_FDR_KEYS

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDG_KEYS

No

Yes

Yes

No

PACKITEM

Yes

No

No

No

ORDHEAD

Yes

No

No

No

ORDLOC

Yes

No

No

No

ORDSKU

Yes

No

No

No

ORDLOC_DISCOUNT

Yes

No

No

No

WH

Yes

No

No

No

ORDER_DISCOUNTS

Yes

No

No

No

PACK_TOTAL_TEMP

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

RFM_XML_GTT

Yes

Yes

No

Yes

RFM_FLX_DOC_FDR_KEYS_HIST

No

Yes

No

No

RFM_FLX_DOC_FDG_KEYS_HIST

No

Yes

No

No

Process Flex Integration Get Service

Functional Area

Fiscal Management

Business Overview

This service exports a single fiscal document and/or fiscal document data from the RFMCS Fiscal Document Management feature. This is a “getNext” type of service that will consume and remove the record from a queue. The response payload does not have pagination.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/flx/integration/get?scenario=<String>&requestType=<String>&fromDate=<Date>&toDate=<Date>&locationCode=<String>&locationType=<String>&module=<String>
Input
Parameter Name Required Data Type Description Valid values

scenario

Yes

String

Document`s Workflow Scenario code.

 

fromDate

No

Datetime

Start date for the return of data.

 

toDate

No

Datetime

End date for the return of data.

 

locationCode

No

String

Location ID.

 

locationType

No

String

Location type.

 

module

No

String

Indicates the module.

 
Output
Parameter Name Data Type Description

RestRfmFlxPayloadRec

RestRfmFlxPayloadRec

Object that represents the next available XML payload based on informed parameters.

Table 3-14 RestRfmFlxPayloadRec

Parameter Name Data Type Description

intPayload

String

Payload of the document or document data in scope for the integration scenario.

XML Structure

Example for the workflow POFDR, scenario nfeStatusVerificationRequest:

<?xml version="1.0" encoding="UTF-8"?>
<flxIntegration xmlns="http://www.oracle.com/retail/flx/integration/v1">
   <intScenario>nfeStatusVerificationRequest</intScenario>
   <intPrefix>nfeStatusVerificationRequest</intPrefix>
   <intVersion>1</intVersion>
   <intRelease>24.0.101.0</intRelease>
   <intRequestSystem>RFM</intRequestSystem>
   <intCode>363</intCode>
   <intBody xmlns="">
      <consSitNFe>
         <versao>4.00</versao>
         <tpAmb>1</tpAmb>
         <xServ>CONSULTAR</xServ>
         <chNFe>32210705570714000825550010112152241240205631</chNFe>
      </consSitNFe>
   </intBody>
</flxIntegration>
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FLX_DOC_FDR_KEYS

Yes

No

No

No

RFM_FLX_DOC_FDR

Yes

No

No

No

RFM_FLX_DOC_FDG_DATA_XML

Yes

No

No

No

RFM_INT_SETUP

Yes

No

No

No

RFM_INT_QUEUE

Yes

No

No

Yes

RFM_INT_XML_PAYLOAD

Yes

No

No

Yes

NFE Manifest Service

Functional Area

Fiscal Management

Business Overview

This service calls the POFDR workflow in RFMCS with the document internal ID that needs to have the specific step nfeManifestRequest executed irrespective of the manifest days parameter set for the location. This supports exceptions when the document needs to be sent to the government for a receipt manifest. The service execution will be completed once the workflow step is complete, whether the subsequent steps are successful or not.

Service Type

Post

ReST URL
{{baseUrl}}/services/private/flx/fdr/nfeManifest
Input
Parameter Name Required Data Type Description Valid values

docId

Yes

String

Action that will be requested.

JSON Input Structure

{
  "docId": "9999"
}
Output
Parameter Name Data Type Description

status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

errors

List<RestRfmFdmError>

Collection of errors.

Table 3-15 RestRfmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

JSON Structure

{
   "status": "S",
   "errors": null
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_CODE_DETAIL

Yes

No

No

No

RFM_CODE_DETAIL_TL

Yes

No

No

No

RFM_WFLW_SET

Yes

No

No

No

RFM_WFLW_EVE_LOG

Yes

No

No

No

RFM_WFLW_STA_LOG

Yes

Yes

No

No

RFM_FLX_DOC_FDR

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR_DATA_XML

Yes

Yes

Yes

Yes

RFM_WFLW_SET_VAR

Yes

No

No

No

RFM_WFLW_EXEC_VAR

Yes

No

No

No

RFM_WFLW_SET_ACTION

Yes

No

No

No

RFM_WFLW_ERR

No

Yes

No

No

RFM_WFLW_EVE_LOG

No

Yes

No

No

RFM_FLX_SET_CONTENT

Yes

No

No

No

RFM_FLX_DOC_FDR_HIST

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR_DATA_JSON

No

Yes

Yes

No

RFM_FLX_DOC_FDR_DATA_XML_HIST

No

Yes

Yes

No

RFM_FLX_DOC_FDR_KEYS

Yes

Yes

Yes

No

Integration Configuration Get Service

Functional Area

Fiscal Management

Business Overview

The purpose of this service is to list the existing integration configuration in the system.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/integration/list
Output

Table 3-16 Manage - Object. See list of elements for detail

Element Name Data Type Description

collectionSize

Number (4)

Number of items in the collection.

items

Collection of Object

References a collection of webhook listeners.

Table 3-17 Items - Object. See list of elements for detail

Element Name Data Type Description

intId

Number

Integration id

scenCode

String

Scenario name.

wflwCode

String

Workflow coded.

credentialName

String

Registered credential name that was setup using the Manage Webhook Credential service. For update, this can be left blank.

targetUrl

String

A whitelisted listener endpoint which is running a post service to consume the integration call and returns 200 for success.

enabled

String

Takes a value of Y (default if null) or N. If the integration is disabled, it will pause polling and publish the integration.

intervalSeconds

Number

Defines the polling seconds for the integration server to poll for new events. This value is in seconds.

JSON Structure

{
  "collectionSize": 2,
  "items": [
    {
      "intId": 3,
      "scenCode": "nfeCancelationRequest",
      "wflwCode": "COMMON",
      "credentialName": "CREDENTIAL1",
      "targetUrl": "https://targeturl.com/nfeCancelationRequest",
      "enabled": "Y",
      "intervalSeconds": 1
    },
    {
      "intId": 5,
      "scenCode": "nfeIssueRequest",
      "wflwCode": "COMMON",
      "credentialName": "CREDENTIAL1",
      "targetUrl": "https://targeturl.com/nfeIssueRequest",
      "intervalSeconds": 1
    }
  ]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_INT_CONFIG

Yes

No

No

No

Integration Configuration Update Service

Functional Area

Fiscal Management

Business Overview

The purpose of this service is to update the existing integration configuration in the system.

To modify or create a credential for the integration, the credential should be set up first using the Manage Webhook Credential service.

Integration Overview

The target URL should be an allowlisted https ReST endpoint supporting POST methods and having public-trusted SSL/TLS certificate. Once an integration is successfully registered and enabled, it is added to the server thread pool after a short interval and it will then run using the configured interval.

The processing of integration is asynchronous. Using a background micro-batch engine, the RFM integration server checks for new events in RFM integration tables with new entries in the queue. The frequency at which the server polls the queue is configured using the field intervalSeconds. Every interval seconds, the server will poll the table to check for new entries and, if there are new updates, it will make a call to the target URL to publish the payload depending on the integration configuration. If there are no new entries, it will not make an empty call.

Enable/Disable

The flag enabled uses a value of Y or N. This flag activates or deactivates an integration. If the integration is disabled, it pauses all polls and even heartbeat calls to the listener. Once the integration is enabled, it polls using the since timestamp of the last publish.

Update Integration Configuration

To update the configuration of a integration, include the field that need to be updated and its value will be replaced. The fields that are left blank will not be changed.

  • Target URL changes are applied immediately. A change of URL fires a heartbeat and, once the heartbeat is successful, subsequent calls are published to the new URL.

  • Change of credential changes take effect immediately.

  • Interval second change take effect a few minutes after the integration engine syncs with update configuration.

  • Disable integration takes effect immediately. Enabling of the webhook requires a few minutes for the server engine to include the webhook in its thread pool.

Important

Do not change the values of this integration frequently. This is usually a one-time activity.

Service Type

Put

ReST URL
{{baseUrl}}/services/private/integration/manage
Input Payload Details

Table 3-18 Manage - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of webhook listeners.

Table 3-19 Items - Object. See list of elements for detail

Element Name Required Data Type Description

intId

Yes

Number

Integration ID

scenCode

No

String

Scenario name.

wflwCode

No

String

Workflow coded.

credentialName

No

String

Registered credential name that was set up using the Manage Webhook Credential service. For an update, this can be left blank.

targetUrl

No

String

A whitelisted listener endpoint which is running a post service to consume the integration call and returns 200 for success.

enabled

Yes

String

Takes a value of Y (default if null) or N. If the integration is disabled, it will pause polling and publish the integration.

intervalSeconds

Yes

Number

Defines the polling seconds for the integration server to poll for new events. This value is in seconds.

JSON Input Structure

{
    "collectionSize": 2,
    "items": [
        {
            "intId": 3,
            "scenCode": "nfeCancelationRequest",
            "wflwCode": "COMMON",
            "credentialName": "CREDENTIAL1",
            "targetUrl": "https://targeturl.com/nfeCancelationRequest",
            "enabled": "Y",
            "intervalSeconds": 1
        },
        {
            "intId": 5,
            "scenCode": "nfeIssueRequest",
            "wflwCode": "COMMON",
            "credentialName": "CREDENTIAL1",
            "targetUrl": "https://targeturl.com/nfeIssueRequest",
            "intervalSeconds": 1
        }
    ]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_INT_CONFIG

Yes

No

Yes

No

Documents Get Service

Functional Area

Fiscal Management

Business Overview

This service exports a bulk of fiscal documents and/or fiscal document data and its history from the RFMCS Fiscal Document Management feature. The response payload will have pagination.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/documents?scenario=<String>&requestType=<String>&fromDate=<Date>&toDate=<Date>&locationCode=<String>&locationType=<String>&module=<String>&pageSize=<Number>&pageNumber=<number>
Input
Parameter Name Required Data Type Description Valid values

scenario

Yes

String

Document`s Workflow Scenario code.

 

fromDate

No

Datetime

Start date for the return of data.

 

toDate

No

Datetime

End date for the return of data.

 

locationCode

No

String

Location ID.

 

locationType

No

String

Location type.

 

module

No

String

Indicates the module.

 

pageSize

No

Number

Indicates the size (maximum number of documents) that will be returned in the call. DefaultValue: 25.

 

pageNumber

No

Number

Indicates the page number.

DefaultValue: 1.

The pageResult object will return the payloads based on the values ​​provided on pageNumber and PageSize. If the page size is 25 and the page number is 1, the first 25 found records will be returned, if the pageSize is 2, the records will be get from the second page (26-50).

 
Output
Parameter Name Data Type Description

PageResults

A paged result that represents available data and XML payloads obtained based on informed parameters.

Table 3-20 PageResults

Parameter Name Data Type Description

totalRecordCount

Number

Total records found based on informed parameters.

count

Number

The number of records returned on the pageResults object.

limit

Number

Maximum number of documents that a single call can return.

hasMore

Boolean

Indicates whether there are more records than those returned in the service call.

results

List <item>

List of XML records found based on the parameters provided.

item

String

Represents the found XML content.

XML Structure

Example for the workflow POFDR, scenario nfeStatusVerificationRequest:

<pagedResultsRDO>
  <items>
    <flxIntegration xmlns="http://www.oracle.com/retail/flx/integration/v1">
      <intScenario>nfeStatusVerificationRequest</intScenario>
      <intPrefix>nfeStatusVerificationRequest</intPrefix>
      <intVersion>1</intVersion>
      <intRelease>24.0.101.0</intRelease>
      <intRequestSystem>RFM</intRequestSystem>
      <intCode>2ABFD72E58855D68E06340C34C64B9CF</intCode>
      <intBody xmlns="">
        <consSitNFe>
          <versao>4.00</versao>
          <tpAmb>1</tpAmb>
          <xServ>CONSULTAR</xServ>
          <chNFe>32210705570714000825550010112152241230170002</chNFe>
        </consSitNFe>
      </intBody>
    </flxIntegration>
    <flxIntegration xmlns="http://www.oracle.com/retail/flx/integration/v1">
      <intScenario>nfeStatusVerificationRequest</intScenario>
      <intPrefix>nfeStatusVerificationRequest</intPrefix>
      <intVersion>1</intVersion>
      <intRelease>24.0.101.0</intRelease>
      <intRequestSystem>RFM</intRequestSystem>
      <intCode>2ABD3BBC5BEA0EBDE06340C34C64C70C</intCode>
      <intBody xmlns="">
        <consSitNFe>
          <versao>4.00</versao>
          <tpAmb>1</tpAmb>
          <xServ>CONSULTAR</xServ>
          <chNFe>32210705570714000825550010112152241240125486</chNFe>
        </consSitNFe>
      </intBody>
    </flxIntegration>
  </items>
  <hasMore>true</hasMore>
  <limit>2</limit>
  <count>2</count>
  <totalRecordCount>149</totalRecordCount>
</pagedResultsRDO>
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FLX_DOC_FDR_KEYS

Yes

No

No

No

RFM_FLX_DOC_FDR

Yes

No

No

No

RFM_FLX_DOC_FDR_DATA_XML

Yes

No

No

No

RFM_FLX_DOC_FDG_KEYS

Yes

No

No

No

RFM_FLX_DOC_FDG

Yes

No

No

No

RFM_FLX_DOC_FDG_DATA_XML

Yes

No

No

No

Documents Status Get Service

Functional Area

Fiscal Management

Business Overview

This service exports a bulk of fiscal documents status from the RFMCS Fiscal Document Management feature. The response payload will have pagination.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/documents/status?scenario=<String>&requestType=<String>&fromDate=<Date>&toDate=<Date>&locationCode=<String>&locationType=<String>&module=<String>&pageSize=<Number>&pageNumber=<number>
Input
Parameter Name Required Data Type Description Valid values

Workflow

Yes

String

Document`s Workflow code.

 

docId

No

Number

Document’s ID.

 

scenario

No

String

Document`s Workflow Scenario code.

 

docStatus

No

String

Document’s status.

 

wflwStatus

No

String

Workflow’s status.

 

intRequestCode

No

String

Document’s request code.

 

locationCode

No

String

Location ID.

 

locationType

No

String

Location type.

 

pageSize

No

Number

Indicates the size (maximum number of documents) that will be returned in the call. DefaultValue: 25.

 

pageNumber

No

Number

Indicates the page number.

DefaultValue: 1.

The pageResult object will return the payloads based on the values ​​provided on pageNumber and PageSize. If the page size is 25 and the page number is 1, the first 25 found records will be returned, if the pageSize is 2, the records will be get from the second page (26-50).

 
Output
Parameter Name Data Type Description

RestRfmDocStatusDataTbl

List < RestRfmDocStatusDataRec>

A collection of document status records.

Table 3-21 RestRfmDocStatusDataRec

Parameter Name Data Type Description

docId

Number

Document ID.

wflwCode

String

Workflow code.

wflwStatus

String

Workflow Status.

wflwStatusDesc

String

Description of the workflow status.

scenCode

String

Scenario's code.

scenCodeDesc

String

Scenario's code description.

procStatus

String

Workflow process status.

procStatusDesc

String

Workflow process status description.

startTime

String

Scenario's start time.

Output Structure

Example for a single call using just POFDR as a parameter.

{
  "items": [
    {
      "docId": 1233,
      "wflwCode": "POFDR",
      "wflwStatus": "CMPLT",
      "wflwStatusDesc": "Completed",
      "scenCode": "endWorkflowOk",
      "scenCodeDesc": "Workflow Completed",
      "procStatus": "SUCCESS",
      "statusCodeDesc": "Workflow Completed",
      "startTimeDisplay": "02-Jan-2025 20:19:26",
      "startTime": 1735849166192
    },
    {
      "docId": 1232,
      "wflwCode": "POFDR",
      "wflwStatus": "ACTREQ",
      "wflwStatusDesc": "Action Required",
      "scenCode": "generateASNInMessage",
      "scenCodeDesc": "Generate ASNIN Message",
      "procStatus": "WAITING",
      "statusCodeDesc": "Generate ASNIN Message Waiting",
      "startTimeDisplay": "02-Jan-2025 17:11:01",
      "startTime": 1735837861623
    }
  ],
  "hasMore": true,
  "limit": 2,
  "count": 2,
  "totalRecordCount": 115
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FLX_DOC_FDR_KEYS

Yes

No

No

No

RFM_FLX_DOC_FDR

Yes

No

No

No

RFM_FLX_DOC_FDG_KEYS

Yes

No

No

No

RFM_FLX_DOC_FDG

Yes

No

No

No

V_RFM_WFLW_MONITOR

Yes

No

No

No

Ledger Manage Service

Functional Area

Fiscal Management

Business Overview

This service manages ledger records and its tax information from the RFMCS Fiscal Document Management feature.

Service Type

PUT

ReST URL
{{baseUrl}}/services/private/documents/ledger/manage
Input
Element Name Required Data Type Description

items

Yes

List < RestRfmLedgerInductionRec >

References a collection of ledger records.

Table 3-22 RestRfmLedgerInductionRec

Parameter Name Data Type Description

action

string

Action. Valid values are NEW or DEL.

ledgerId

Number

Ledger ID. When the action is NEW the ledger ID can be empty. For DEL action this field is mandatory.

ledgerStatus

String

Ledger Status. P for processed. C for cancelled.

ledgerType

String

Ledger type IN or OUT.

locType

String

Ledger location type.

locId

number

Ledger location ID.

participantType

string

Type of the participant entity of the transaction. Participant is the location´s counterpart in a transaction. Valid types are SUPS, ST, WH, PTNR.

participant

number

Participant code.

item

string

Item code.

workflow

string

Workflow identifier.

docItemQty

number

Item unit cost.

methodOut

string

Method of search for last entry. LIFO - Last in first out. Selects higher date first. FIFO - First in first out. Selects lowest date first.

taxDataRecords

List <restRfmLedgerTaxDataRec>

Collection of ledger tax records.

Table 3-23 RestRfmLedgerTaxInductionRec

Parameter Name Data Type Description

taxCode

String

Tax code from the fiscal document. The tax codes will come directly from the fiscal document without validation with VAT_CODES table. However, for maintenance purposes, this column will have a list of values coming from the VAT_CODES table.

taxbase

Number

Basis on which the tax is applied.

taxValue

Number

Value of the tax for the item considering the item document quantity.

taxCreditBase

Number

Basis on which the tax credit is applied.

taxCreditValue

Number

Value of the tax credit calculated for the item considering the item document quantity.

Input Structure

Example for a single call with no specified parameters.

{
  "items": [
    {
      "action": "NEW",
      "ledgerType": "IN",
      "locType": "S",
      "locId": 7701,
      "participantType": "S",
      "participant": 7700,
      "item": "101350000",
      "workflow": "POFDR",
      "docItemQty": 1,
      "docItemUnitCost": 285.78,
      "taxDataRecords": [
        {
          "taxCode": "ICMS",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "taxCode": "COFINS",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "taxCode": "PIS",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "taxCode": "ICMSST",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        }
      ]
    }
  ]
}
Output
Parameter Name Data Type Description

status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

errors

List<RestRfmFdmError>

Collection of errors.

Table 3-24 RestRfmFdmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FISCAL_LEDGER

Yes

Yes

Yes

No

RFM_FISCAL_LEDGER_TAX

Yes

Yes

Yes

No

SVC_RFM_FISCAL_LEDGER

Yes

Yes

Yes

Yes

SVC_RFM_FISCAL_LEDGER_TAX

Yes

Yes

Yes

Yes

Ledger Get Service

Functional Area

Fiscal Management

Business Overview

This service exports a bulk of ledger records and its tax information from the RFMCS Fiscal Document Management feature. The response payload will have pagination.

Service Type

Get

ReST URL
{{baseUrl}}/services/private/documents/ledger?locType=<String>&locId=<String>&participantType=String&participant=String&itemId=<String>&status=<String>&ledgerType=<String>&workflow=<String>&fromDate=<Date>&toDate=<Date>&pageSize=<Number>&pageNumber=<number>
Input
Parameter Name Required Data Type Description Valid values

locType

Yes

String

Type of location (WH, ST).

 

locId

No

Number

Location ID.

 

participanType

No

String

Type of the participant entity of the transaction. Participant is the location´s counterpart in a transaction. Valid types are SUPS, ST, WH, PTNR.

 

participant

No

String

Participant code.

 

itemId

No

String

Item code.

 

status

No

String

Ledger status.

P for processed. C for cancelled.

ledgerType

No

String

Location ID.

 

workflow

No

String

Ledger type.

IN / OUT.

fromDate

No

Date

Records since date.

 

toDate

No

Date

Records to date.

 

pageSize

No

Number

Indicates the size (maximum number of documents) that will be returned in the call. DefaultValue: 25.

 

pageNumber

No

Number

Indicates the page number.

DefaultValue: 1.

The pageResult object will return the payloads based on the values ​​provided on pageNumber and PageSize. If the page size is 25 and the page number is 1, the first 25 found records will be returned, if the pageSize is 2, the records will be get from the second page (26-50).

 
Output
Parameter Name Data Type Description

RestRfmLedgerDataTbl

List < RestRfmLedgerDataRec>

A collection of ledger records.

Table 3-25 RestRfmLedgerDataRec

Parameter Name Data Type Description

ledgerId

Number

Ledger ID.

ledgerStatus

String

Ledger Status. P for processed. C for cancelled.

ledgerType

String

Ledger type IN or OUT.

locType

String

Ledger location type.

locId

String

Ledger loc id.

participantType

String

Type of the participant entity of the transaction. Participant is the location´s counterpart in a transaction. Valid types are SUPS, ST, WH, PTNR.

participant

String

Participant code.

item

String

Item code.

simplePackInd

String

Simple Pack indicator.

workflow

String

Workflow identifier.

transactionId

String

Transaction ID.

ledgerDate

Date

Date of record creation.

docId

Number

Document ID.

docLineId

Number

Document line ID.

docItemUom

String

Unity of measure.

docItemQty

Number

Item quantity.

docItemUnitCost

Number

Item unit cost.

netReceivedQty

Number

Item quantity after receiving process.

balance

Number

Quantity available.

refLedgerId

Number

Referenced ledger_id. Use only in OUT transactions.

refDocId

Number

Referenced ledger document id.

refDocLineId

Number

Referenced ledger document line id.

methodOut

String

Method of search for last entry LIFO - Last in first out. Selects higher date first. FIFO - First in first out. Selects lowest date first.

userDefinedInd

String

Indicates whether the ledger record was created through UI. Valid values are: Y/N.

taxDataRecords

List <restRfmLedgerTaxDataRec>

Collection of ledger tax records.

Table 3-26 restRfmLedgerTaxDataRec

Parameter Name Data Type Description

ledgerId

Number

Ledger ID.

taxCode

String

Tax code from the fiscal document. The tax codes will come directly from the fiscal document without validation with VAT_CODES table, however for maintenance purposes, this column will have a list of values coming from the VAT_CODES table.

taxbase

Number

Basis to which the tax is applied.

taxValue

Number

Value of the tax for the item considering the item document quantity.

taxCreditBase

Number

Basis to which the tax credit is applied.

taxCreditValue

Number

Value of the tax credit calculated for the item considering the item document quantity.

Output Structure

Example for a single call with no specified parameters.

{
  "items": [
    {
      "ledgerId": 826,
      "ledgerStatus": "P",
      "ledgerType": "IN",
      "locType": "S",
      "locId": 7701,
      "participantType": "S",
      "participant": 7700,
      "item": "101350000",
      "simplePackInd": "N",
      "workflow": "TSFDR",
      "transactionId": "133000000001",
      "ledgerDateDisplay": "06-Jan-2025 16:56:11",
      "ledgerDate": 1736182571000,
      "docId": "1234",
      "docLineId": 1,
      "docItemUom": "Each",
      "docItemQty": 1,
      "docItemUnitCost": 285.78,
      "netReceivedQty": 1,
      "balance": 1,
      "refLedgerId": null,
      "refDocId": null,
      "refDocLineId": null,
      "refDocModule": null,
      "methodOut": null,
      "userDefinedInd": "N",
      "taxDataRecords": [
        {
          "ledgerId": 826,
          "taxCode": "ICMS",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "ledgerId": 826,
          "taxCode": "COFINS",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "ledgerId": 826,
          "taxCode": "PIS",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "ledgerId": 826,
          "taxCode": "ICMSST",
          "taxBase": 0,
          "taxValue": 0,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        }
      ]
    },
    {
      "ledgerId": 825,
      "ledgerStatus": "P",
      "ledgerType": "OUT",
      "locType": "S",
      "locId": 7700,
      "participantType": "S",
      "participant": 7701,
      "item": "101350000",
      "simplePackInd": "N",
      "workflow": "TSFDG",
      "transactionId": "133000000001",
      "ledgerDateDisplay": "06-Jan-2025 16:23:12",
      "ledgerDate": 1736180592000,
      "docId": "1542",
      "docLineId": 1,
      "docItemUom": "Each",
      "docItemQty": 1,
      "docItemUnitCost": 285.78,
      "netReceivedQty": null,
      "balance": null,
      "refLedgerId": 824,
      "refDocId": "1233",
      "refDocLineId": 1,
      "refDocModule": "FDR",
      "methodOut": "LIFO",
      "userDefinedInd": "N",
      "taxDataRecords": [
        {
          "ledgerId": 825,
          "taxCode": "ICMS",
          "taxBase": 298.65,
          "taxValue": 35.838,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        },
        {
          "ledgerId": 825,
          "taxCode": "COFINS",
          "taxBase": 262.812,
          "taxValue": 19.973,
          "taxCreditBase": 262.812,
          "taxCreditValue": 19.973
        },
        {
          "ledgerId": 825,
          "taxCode": "PIS",
          "taxBase": 262.812,
          "taxValue": 4.336,
          "taxCreditBase": 262.812,
          "taxCreditValue": 4.336
        },
        {
          "ledgerId": 825,
          "taxCode": "ICMSST",
          "taxBase": 455.113,
          "taxValue": 46.082,
          "taxCreditBase": 0,
          "taxCreditValue": 0
        }
      ]
    }
  ],
  "hasMore": true,
  "limit": 2,
  "count": 2,
  "totalRecordCount": 522
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_FISCAL_LEDGER

Yes

No

No

No

RFM_FISCAL_LEDGER_TAX

Yes

No

No

No

Document Upload Service

Functional Area

Fiscal Management

Business Overview

This service uploads fiscal document data from legacy systems into RFMCS, to support the generation of returns and RMA documents that require reference fiscal documents.

Service Type

POST

ReST URL
{{baseUrl /services/private/flx/documents/upload
Input
Element Name Required Data Type Description

items

Yes

List < flxIntegration >

References a collection of ledger records.

Table 3-27 flxIntegration

Element Name Required Data Type Description

flxIntegration

Yes

flxIntegrationRec

Integration record.

Table 3-28 flxIntegrationRec

Parameter Name Required Data Type Description Valid values

wflwCode

Yes

String

Document workflow code.

 

intScenario

Yes

String

Document`s Workflow Scenario code.

 

intRequestSystem

No

String

This field contains the identification name of the system that is requesting the integration.

 

intRequestCode

No

String

This field contains the identification code of the system that is requesting the integration.

 

intBody

Yes

String

Payload of the document or document data in scope for the integration scenario.

 

XML Input Structure

Example for the workflow POFDR, scenario poDocumentMigrationData that creates a fiscal document in RFMCS for fiscal receiving based on the Brazilian NFE invoice.

<?xml version="1.0" encoding="UTF-8"?>
<flxIntegration xmlns="http://www.oracle.com/retail/flx/integration/v1">
  <wflwCode>PODMD</wflwCode>
  <intScenario>poDocumentMigrationData</intScenario>
  <intPrefix>poDocumentMigrationData</intPrefix>
  <intVersion>23.0</intVersion>
  <intRelease>032-121710</intRelease>
  <intRequestSystem>legacySystem</intRequestSystem>
  <intBody>documentMigrationPayload</intBody>
</flxIntegration>
Output
Parameter Name Data Type Description

response

List<RestDocumentRec>

List of documents output.

Table 3-29 RestDocumentRec

Parameter Name Data Type Description

document

RestRfmDocUpRec

Document

Table 3-30 RestRfmDocUpRec

Parameter Name Data Type Description

status

String

Status of the processing executed: E (ERROR) or S (SUCCESS).

intRequestCode

String

This field contains the identification code of the system that is requesting the integration.

docId

Number

Document ID.

wfStatusCode

String

Processing status. Valid values are (START, SUCCESS, FAIL, WARNING).

wfStatusDesc

String

Description of the processing status (wfStatusCode).

errors

List<RestRfmError>

Collection of errors.

Table 3-31 RestRfmError

Parameter Name Data Type Description

errorCode

String

This field contains the error code.

errorDesc

String

This field contains the error description.

seqNo

Number

Error sequence number.

XML Structure

Example for the workflow PODMD

<response>
 <document>
  <status>E</status>
  <intId>2886</intId>
  <docId>914</docId>
  <wfStatusCode>ERROR</wfStatusCode>
  <wfStatusDesc>Deduce Key Data Technical Exception</wfStatusDesc>
  <errors>
   <item>
    <errorCode>PACKAGE_ERROR</errorCode>
    <errorDesc>User Error description.</errorDesc>
   </item>
  </errors>
 </document>
</response>
Table Impact
TABLE SELECT INSERT UPDATE DELETE

RFM_CODE_DETAIL

Yes

No

No

No

RFM_CODE_DETAIL_TL

Yes

No

No

No

RFM_WFLW_ERR

Yes

Yes

No

No

RFM_WFLW_SET

Yes

No

No

No

RFM_WFLW_STA_LOG

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR

Yes

Yes

Yes

Yes

RFM_WFLW_DEF

Yes

No

No

No

RFM_FLX_DOC_FDG

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR_HIST

Yes

Yes

Yes

No

RFM_FLX_DOC_FDG_HIST

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDR_DATA_XML

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDR_DATA_XML_HIST

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDG_DATA

Yes

No

No

Yes

RFM_FLX_DOC_FDG_DATA_XML_HIST

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDG_DATA_XML

Yes

Yes

Yes

Yes

RFM_WFLW_SET_VAR

Yes

No

No

No

RFM_WFLW_EXEC_VAR

Yes

No

Yes

No

RFM_WFLW_SET_ACTION

Yes

No

No

No

RFM_FLX_SET_CONTENT

Yes

No

No

No

RFM_USER_LOCATION

Yes

No

No

No

RFM_FLX_DOC_FDR_KEYS

Yes

Yes

Yes

Yes

RFM_FLX_DOC_FDG_KEYS

No

Yes

Yes

No

PACKITEM

Yes

No

No

No

ORDHEAD

Yes

No

No

No

ORDLOC

Yes

No

No

No

ORDSKU

Yes

No

No

No

ORDLOC_DISCOUNT

Yes

No

No

No

WH

Yes

No

No

No

ORDER_DISCOUNTS

Yes

No

No

No

PACK_TOTAL_TEMP

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

RFM_XML_GTT

Yes

Yes

No

Yes

RFM_FLX_DOC_FDR_KEYS_HIST

Yes

Yes

No

Yes

RFM_FLX_DOC_FDG_KEYS_HIST

Yes

Yes

No

Yes

Batch Processes

rfmfdmreclass

Module Name

rfmfdmreclass.ksh

Description

The script calls the RFM in order process all fiscal reclass records in status NEW or PENDING.

Functional Area

Rfm

Module Type

Admin – Ad hoc

Module Technology

Background Processing

Catalog ID

Wrapper Script

rmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch processes fiscal reclassification records in RFM for entities and/or item attributes until all steps have been completed. The batch also accounts for the necessary steps to complete the reclassification process, such as verifying the accuracy of the data, executing the necessary validations, and applying the changes to the system. The batch execution will be completed once the reclassification process is complete, whether it is successful or unsuccessful.

Restart/Recovery

N/A

Key Tables Affected
TABLE SELECT INSERT UPDATE DELETE

SVC_RFM_FDM_FISCAL_RECLASS

Yes

No

No

No

RFM_WFLW_SET

Yes

No

No

No

RFM_WFLW_SET_VAR

Yes

No

No

No

RFM_WFLW_EXEC_VAR

Yes

No

No

No

RFM_WFLW_SET_ACTION

Yes

No

No

No

RFM_WFLW_ERR

No

Yes

No

No

RFM_WFLW_EVE_LOG

No

Yes

No

No

RFM_WFLW_STA_LOG

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_ITEM

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_ITEMLOC

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_ITEMSUPP

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_LOCATION

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_ORDCUST

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_PARTNER

Yes

Yes

Yes

No

RFM_FDM_ATTRIB_SUPPLIER

Yes

Yes

Yes

No

         
Design Assumptions

N/A

fdrmanifest

Module Name

fdrmanifest.ksh

Description

The script identifies invoices that should be sent to SEFAZ for manifest.

Functional Area

Rfm

Module Type

Admin – Ad hoc

Module Technology

Background Processing

Catalog ID

Wrapper Script

rmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch calls the POFDR workflow in RFMCS with the document internal ID that needs to have the specific step nfeManifestRequest executed based on the manifest days parameter set for the location. The batch execution will be completed once the workflow step is complete, whether the subsequent steps are successful or not.

Restart/Recovery

N/A

Key Tables Affected
Table Select Insert Update Delete

RFM_CODE_DETAIL

Yes

No

No

No

RFM_CODE_DETAIL_TL

Yes

No

No

No

RFM_WFLW_SET

Yes

No

No

No

RFM_WFLW_EVE_LOG

Yes

No

No

No

RFM_WFLW_STA_LOG

Yes

Yes

No

No

RFM_FLX_DOC_FDR

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR_DATA_XML

Yes

Yes

Yes

Yes

RFM_WFLW_SET_VAR

Yes

No

No

No

RFM_WFLW_EXEC_VAR

Yes

No

No

No

RFM_WFLW_SET_ACTION

Yes

No

No

No

RFM_WFLW_ERR

No

Yes

No

No

RFM_WFLW_EVE_LOG

No

Yes

No

No

RFM_FLX_SET_CONTENT

Yes

No

No

No

RFM_FLX_DOC_FDR_HIST

Yes

Yes

Yes

No

RFM_FLX_DOC_FDR_DATA_JSON

No

Yes

Yes

No

RFM_FLX_DOC_FDR_DATA_XML_HIST

No

Yes

Yes

No

RFM_FLX_DOC_FDR_KEYS

Yes

Yes

Yes

No

Design Assumptions

N/A

rfmfinpost

Module Name

rfmfinpost.ksh

Description

Extracts data from fiscal documents for external financial system integration

Functional Area

Rfm

Module Type

Admin – Ad hoc

Module Technology

Ksh

Catalog ID

Wrapper Script

rmswrap_shell.ksh

Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch is intended to extract financial data information from fiscal documents and place the data into staging tables for financial integration.

Restart/Recovery

N/A

Key Tables Affected
Table Select Insert Update Delete

RFM_FIN_POST_STG

Yes

No

Yes

No

RFM_SET_ACCOUNTS

Yes

No

No

No

RFM_XML_GTT

Yes

Yes

Yes

Yes

RFM_SET_CROSS_REF

Yes

No

No

No

RFM_AP_STAGE_HEAD

No

Yes

Yes

No

RFM_AP_STAGE_DETAIL

No

Yes

Yes

No

RFM_FINANCIALS_STAGE

No

Yes

Yes

No

Design Assumptions

N/A

rfm_fif_ap_publish

Module Name rfm_fif_ap_publish.ksh
Description Extracts data from staged fiscal documents to external financial system integration - publish
Functional Area Rfm
Module Type Admin – Ad hoc
Module Technology Ksh
Catalog ID
Wrapper Script rmswrap_shell.ksh
Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch extracts financial data information from staged fiscal documents and places the data into publish tables for financial integration.

Restart/Recovery

N/A

Key Tables Affected
Table Select Insert Update Delete
RFM_FIN_POST_STG Yes No Yes Yes
RFM_FIN_POST_STG_HIST No Yes No No
RFM_AP_STAGE_HEAD Yes No No Yes
RFM_AP_STAGE_HEAD_HIST No Yes No No
RFM_AP_STAGE_DETAIL No Yes Yes No
RFM_AP_STAGE_DETAIL_HIST No Yes No No
FIF_AP_HEAD_PUBLISH Yes Yes No Yes
FIF_AP_DETAIL_PUBLISH Yes Yes No Yes
Design Assumptions

N/A

rfm_fif_gl_publish

Module Name rfm_fif_gl_publish.ksh
Description Extracts data from staged fiscal documents to external financial system integration - publish
Functional Area Rfm
Module Type Admin – Ad hoc
Module Technology Ksh
Catalog ID
Wrapper Script rmswrap_shell.ksh
Schedule

Oracle Retail Merchandising Batch Schedule

Design Overview

This batch extracts financial data information from staged fiscal documents and places the data into publish tables for financial integration.

Restart/Recovery

N/A

Key Tables Affected
Table Select Insert Update Delete
RFM_FIN_POST_STG Yes No Yes Yes
RFM_FIN_POST_STG_HIST No Yes No No
RFM_FINANCIALS_STAGE Yes No No Yes
RFM_FINANCIALS_STAGE _HIST No Yes No No
FIF_GL_PUBLISH Yes Yes No Yes
Design Assumptions

N/A