Mexico Electronic Accounting and Integration With PAC v2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Mexico Electronic Accounting and Integration with PAC

Companies operating in Mexico need to be aware that invoices (factura), and how they are
resented, can have an effect on their business in Mexico, particularly with Mexican tax
authorities. From January 1, 2011 onwards, Mexico began requiring companies to integrate with
the Mexico Tax Authority (SAT) for real-time issuance and approval of electronic invoices.

The new electronic invoice in Mexico is a digital tax receipt called a “Comprobante Fiscal
Digital” (CFDI) or “factura electrónica” that documents and confirms the performance of a
business transaction in accordance with the standards defined by the SAT in Annex 20 of the
Miscellaneous Tax Resolution, and which can be generated, transmitted and protected by
electronic means.

Process Flow

Oracle ERP cloud provides integrated way to generate the electronic invoices and update the
CFDI number on invoices post validation and filing by PAC.

 Invoice Processing: Process begins with the Customer creating an ERP invoice via its
standard Receivables process. This triggers the creation of a billing document as per
normal ERP processing.
 Data Extraction: The partner (PAC) should extract the invoice data using Out-Bound
Integration Services to generate the SAT compliance xml.
 PAC Processing: The CFDI compliance solution (from PAC) should receive the
outbound extract, extract and package the data into SAT compliant XML and forwards it
onto for fiscal validation, signature and approval. The Compliance Server will log the
inbound message, validate it for compliance to mandatory attributes and sign it using
government assigned digital seal certificate.
 Update to ERP Cloud: Once the invoice is approved, SAT would generate UUID that
should be passed/ stored on the invoice. This information should be communicated to
the customers. The partner would invoke Web Services to stamp UUID to receivables
Invoice.

Invoice Processing

This is standard invoice entry and processing. The details can be found at link

Data Extraction and PAC Processing

The process is about data to be extracted from Fusion applications and used by Partners for
generation of SAT compliant XML. The ERP cloud provides outbound integration feature for data
extraction to be used by Partner integrations. Outbound integrations are built using the Business
Intelligence capabilities embedded in Oracle ERP Cloud Service. These capabilities include BI
Publisher for high volume transactional data. The diagram below depicts the process for
Outbound Integration.
 Extract Invocation : User launches the outbound Extract flow using a web service by specifying the proper
payload details. Depending upon the Extract name parameter specified the meta data table is queried to fetch
the details regarding the ESS job associated with the extract and the UCM server account for the extract. The
user can run the extract in one of the four modes as explained in the subsequent section by choosing the
Extract Mode parameter

 General Extract Mode

 Incremental Extract Mode

 Re-run Extract Mode

 Incremental Export Date dimension Update Mode

The extract specific child ESS process is submitted. E.g. “Receivables Print Invoice ”. The output file is
generated and uploaded to the UCM account which is seeded in the meta-data table.

 Notification : Upon the successfully upload of the output file to the UCM server account a notification is sent
to the user depending upon the response mode. E.g. mail, Atom feed etc. The user subscribes to the Atom
feed url if the response mode is Atom feed and is able to view the generated feed.

 File download : The user gets the document identifier for the file in the Atom feed or any response
mechanism. The user downloads the file by invoking a web service and specifying the document identifier in
the payload.
 Extract confirmation : The user acknowledges the successful consumption of the file by invocating a
confirmation web service

Illustration:

The extract Receivables transaction flow should be used as outbound extract process to get the
receivables invoices data. The steps for calling the outbound program is mentioned below

1. Prepare the Payload to call Print Receivables transactions ESS program. The input
parameters are mentioned :

Payload Value Comments


Parameter
Name
Job Oracle/apps/ess/financials/receivables/
package transactions/shared/
Name
Job PrintReceivablesTransaction
Definition
Name
Paramlist <BU ID> Business Unit ID
Paramlist NEW Transactions to Print
Paramlist TRX_NUMBER Order BY
Paramlist #NULL Batch Name
Paramlist #NULL Transaction Class
Paramlist #NULL Transaction Type
Paramlist #NULL Customer Class
Paramlist #NULL From Customer
Paramlist #NULL To Customer
Paramlist #NULL From Customer
Account Number
Paramlist #NULL To Customer Account
Number
Paramlist #NULL From Transaction
Number
Paramlist #NULL To Customer Number
Paramlist #NULL Installment Number
Paramlist #NULL From Print Date
Paramlist #NULL To Print Date
Paramlist #NULL Open Invoices Only
Paramlist Default Invoice Template Invoice Template
Name
Paramlist Default Credit Memo Template Credit Memo
template Name
Paramlist Default Credit Memo Template Debit Memo template
Name
Paramlist Default Chargeback Template Chargeback
Template Name
Paramlist No Itemized Tax by Line

The service tester should be used to call the web service with the payload.

2. Prepare the Payload to verify the status of request


3. Prepare the Payload to retrieve the output file

The details of outbound integration is referenced here.

Custom Extract Flow

The flexibility is provided for extraction of extra data elements for receivables invoices which are not
provided by PrintReceivablesTransaction and if, it is required for generation of xml files. BI Publisher (BI
P) delivers out-of-the-box reports, which can handle high transaction volumes and can be exported as
CSV files for import into external systems The user may want to customize the existing extract. He
creates a new custom ESS job using the “Manage Custom Enterprise Scheduler Jobs for Financial
Common Applications”. The user needs to register the custom job in the meta-data entity for it to
appear in the Extract Name Lov. The user will run the Extract in the “Custom Extract Register” mode
where he will enter the following parameters after choosing the extract mode.

 Extract Mode
 Custom Job Name
 Parent Extract Name
On running the extract the records are created in the meta-data entity
FUN_ERP_INTERFACE_OPTIONS. The record in the FUN_ERP_INTERFACE_OPTIONS table for the parent
extract is taken as a reference to create the new record. The data will also be inserted into the child
entity FUN_ERP_INTERFACE_USAGE_DTLS using the record of the parent extract specified. This table
stores the fixed dimension attribute names.

Illustration

Custom Extract flow


1 2 3
Outbound Extract Process
launched from web Extract Mode: Custom Metadata entity
serviceor Extract RegisterUser can populated
Outbound Extract Process enter the custom extract The meta-data entity
launched from Outbound name , job name and the holding the job details,
User
setuplaunches the custom
UI for Business associated parent UCM account is
outbound extract “Payables
objects extract. populated for the
Services Invoice Extract” custom extract using
associated with “Payables the meta-data for the
Invoice Extract”
associated parent
extract in the Before
Report trigger. The
child meta-data entity
holding the fixed
dimension attributes is
also populated for the
custom extract.

Update ERP Cloud

Once the invoice is approved, the PAC would update the UUID to Receivables Invoice GDF.
The ERP cloud DFF service should be used for the purpose. The ERP Object DFF Update
Service is a utility web service that provides an external operation to perform the automatic
update of descriptive flexfield (DFF) attributes. A descriptive/global descriptive flexfield provides
additional expansion space on Oracle ERP Cloud application user interface (UI) pages.
Business enterprises often require the capability to efficiently update specific values in context-
sensitive or global descriptive flexfield (GDF) attributes for a particular business object or
collection of business objects, and the ERP Object DFF Update Service efficiently delivers this
capability.

The ERP Object DFF Update Web Service has the following operation, with details outlined in the
following sections.

Operation: updateDffEntityDetails

The updateDffEntityDetails Operation updates DFF or GDF attribute values for a given business object.

This operation requires DocumentVORowImpl IN List of elements, each containing the details
application user access, and of the Object Details zip to be uploaded.
the following table lists the The details include the file content, file name,
parameters for this content type, file title, author, security group,
operation:document and account. In case of single update this
attribute will be NULL.

operationMode String IN Mode to interpret if it is a single or bulk


upload.
Only single upload mode is currently
supported..

object ErpObjectVORowImpl IN List of elements, each containing the details


of the ERP Object to be updated.

The details include the entity name, context


value, user key attribute values, DFF attribute
name value par.

notification Code String IN Notification code is a two-digit number which


determines how and when a notification is to
be passed for the status of the DFF Update
job.

First Digit 1 Email Notification

2 Bell Notification

Second 0 Send in any case


Digit (DFF update has
failed or
succeeded)

1 Send on update
success

2 Send on update
Failure

Digit Digit Meaning


Position value

Note: The Notification Code needs to be


passed as #NULL for Single Upload Mode.

callback URL String IN The callback URL is the callback URL


to be invoked after submitting the
ERP Business Object DFF Update job

Note: The callback URL needs to be passed


as #NULL for Single Upload Mode.

response String OUT For Single Upload Mode:


‘1’ – Success
‘0’ – Failure
For Bulk Upload Mode:
Request Id of the Process submitted.
User Key Details for the Receivables InvoiceBusiness Object:

User Key Details Comments

User Key A Transaction Number

User Key B Batch Source Name Not Mandatory if Transaction Number is Unique.

User Key C Set Name Not Mandatory if Transaction Number is Unique.

User Key D Transaction Identifier This is not present in the Billing Transaction workbench and
need to create the BIP report to retrieve this.

Technical attribute is CustomerTrxId

User Key E

Note: Batch Source Name and Set Name need to be passed together to uniquely identify the
Transaction.

Sample Payloads

Sample payloads for the updateDffEntityDetails web service operation using the single upload mode)
are provided below:

GDF Update

1. When a Transaction Number is Unique


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:updateDffEntityDetails xmlns:ns1="http://xmlns.oracle.com/apps/financials/commonModules/shared/
model/erpIntegrationService/types/">
<ns1:document xmlns:ns2="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/
erpIntegrationService/">
<ns2:Content>NULL</ns2:Content>
<ns2:FileName>#NULL</ns2:FileName>
<ns2:ContentType>#NULL</ns2:ContentType>
<ns2:DocumentTitle>#NULL</ns2:DocumentTitle>
<ns2:DocumentAuthor>#NULL</ns2:DocumentAuthor>
<ns2:DocumentSecurityGroup>#NULL</ns2:DocumentSecurityGroup>
<ns2:DocumentAccount>#NULL </ns2:DocumentAccount>
<ns2:DocumentName></ns2:DocumentName>
<ns2:DocumentId></ns2:DocumentId>
</ns1:document>
<ns1:operationMode>single</ns1:operationMode>
<ns1:object xmlns:ns2="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/
erpIntegrationService/">
<ns2:EntityName> Receivables Invoice</ns2:EntityName>
<ns2:ContextValue> JLxMXReceivablesInformation</ns2:ContextValue>
<ns2:UserKeyA>TRX_DFF_TEST</ns2:UserKeyA>
<ns2:UserKeyB>#NULL</ns2:UserKeyB>
<ns2:UserKeyC>#NULL</ns2:UserKeyC>
<ns2:UserKeyD>#NULL</ns2:UserKeyD>
<ns2:UserKeyE>#NULL</ns2:UserKeyE>
<ns2:DFFAttributes>{"GLOBAL_ATTRIBUTE1":"Test1","GLOBAL_ATTRIBUTE2":"Test2"}</
ns2:DFFAttributes>
</ns1:object>
<ns1:notificationCode>#NULL</ns1:notificationCode>
<ns1:callbackURL>#NULL</ns1:callbackURL>
</ns1:updateDffEntityDetails>
</soap:Body>
</soap:Envelope>

2. When a Transaction Number is Non-Unique


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:updateDffEntityDetails xmlns:ns1="http://xmlns.oracle.com/apps/financials/commonModules/shared/
model/erpIntegrationService/types/">
<ns1:document xmlns:ns2="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/
erpIntegrationService/">
<ns2:Content>NULL</ns2:Content>
<ns2:FileName>#NULL</ns2:FileName>
<ns2:ContentType>#NULL</ns2:ContentType>
<ns2:DocumentTitle>#NULL</ns2:DocumentTitle>
<ns2:DocumentAuthor>#NULL</ns2:DocumentAuthor>
<ns2:DocumentSecurityGroup>#NULL</ns2:DocumentSecurityGroup>
<ns2:DocumentAccount>#NULL </ns2:DocumentAccount>
<ns2:DocumentName></ns2:DocumentName>
<ns2:DocumentId></ns2:DocumentId>
</ns1:document>
<ns1:operationMode>single</ns1:operationMode>
<ns1:object xmlns:ns2="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/
erpIntegrationService/">
<ns2:EntityName> Receivables Invoice</ns2:EntityName>
<ns2:ContextValue> JLxMXReceivablesInformation</ns2:ContextValue>
<ns2:UserKeyA>TRX_DFF_TEST</ns2:UserKeyA>
<ns2:UserKeyB>AR_Trans Source_07</ns2:UserKeyB>
<ns2:UserKeyC>Vision Operations Set</ns2:UserKeyC>
<ns2:UserKeyD>#NULL</ns2:UserKeyD>
<ns2:UserKeyE>#NULL</ns2:UserKeyE>
<ns2:DFFAttributes>{"ATTRIBUTE1":"Test1","ATTRIBUTE2":"Test2"}</ns2:DFFAttributes>
</ns1:object>
<ns1:notificationCode>#NULL</ns1:notificationCode>
<ns1:callbackURL>#NULL</ns1:callbackURL>
</ns1:updateDffEntityDetails>
</soap:Body>
</soap:Envelope>

How to Grant Access of the Web Service to the Application User

The resources associated with the web service are not granted to the entitlement name
AR_CREATE_RECEIVABLES_INVOICE_PRIV, and this step needs to be executed before using this web
service.

The resource details associated with the web service are as follows:

1) http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/ErpObjectDFFUpdateService#*

2) http://xmlns.oracle.com/apps/financials/receivables/shared/model/erpIntegrationRecvService/ErpObjectRecvService#*
The steps to grant these resources to entitlement are as follows:

Step 1: Define the resource for FSCM stripe,

 Log in to the Application Home Page, then click Navigator-> Setup and
Maintenance

 Query for the task “Manage Duties” and click on the Go To icon

 Click on the Create icon to define the new resource.

Step 2: Grant the resources to the entitlement name


ORA_AR_CREATE_RECEIVABLES_INVOICE_PRIV.

 Query the role name and click on the add button to add the resource mentioned above.

 You need to grant the invoke action on these resources.

You might also like