Integration Rules - Type 2

This topic relates to the first generation of Integration Rules. Contact your FinancialForce representative for information about the suitability and availability of the next generation of integration rules (ClickLink).

Integration rules of this type have both a source object and a target object defined. They are designed to map fields between objects.

If a field is mapped in an integration rule, the process will respect that mapping and use the value from the corresponding field on the source object, even if the field is empty (with the exception of empty tax rates - see "Handling tax codes, rates and values" below).

Note:

If the targets are your own custom fields on sales invoices or credit notes, you must also create type 1 integration rules to make them available on those pages, for printing from Accounting, and in the Accounting API.

Restrictions

Handling tax codes, rates and values

All tax calculations are performed after the integration rule process has populated the mapped fields.

If no tax information is imported, tax is calculated based on account and product details.

Tax codes and values are handled as follows:

  • [SUT mode only]
    • You cannot map tax values in an integration rule.
    • If tax rates are imported, the tax values are calculated accordingly.
    • If tax codes are imported, the corresponding tax rates are retrieved for each tax code and the tax values are calculated accordingly.The imported tax codes must exist in your Salesforce organization.
    • If tax codes and tax rates are imported, the imported tax rates override the tax rates on the associated imported tax codes and the tax values are calculated accordingly. However if an imported tax rate field is empty, the tax rate is then retrieved from the associated imported tax code.
  • [VAT and GST modes only]
    • You cannot map tax rates in an integration rule. If you map the tax value, then a tax code must be mapped too.
    • If tax codes are imported, the corresponding tax rates are retrieved for each tax code and the tax values are calculated accordingly. The imported tax codes must exist in your Salesforce organization.
    • If tax values are imported, they are not calculated even if you also import tax codes.

Type 2a - Customize field mapping from opportunities

Do you want to customize the way sales invoices and credit notes are created using the data from opportunities?

By default, the base application provides a custom Create Invoice button that your administratorClosed One or more individuals in your organization who can configure and customize the application. Users assigned the System Administrator profile have administrator privileges. adds to the opportunity page. This button creates sales invoices using the data held on opportunities.

The application also provides a Convert to Credit Note button on the sales invoice page which creates sales credit notes by converting sales invoices. If the sales invoices were created using the information stored on opportunities, the information from the opportunities is used to create the credit notes.

If you want to map additional fields from opportunities to sales invoices or credit notes, you must create this type of integration rule.

You have the option to select the field on the source object that you want to be updated with the document number. This field must be a lookup to the target object.

Similarly, you have the option to select the field on the source object that you want to indicate that the record has been processed. This field must be a checkbox.

Note:
  • You cannot create more than one rule of this type for each target object or target detail object.
  • You do not need to create any custom buttons to use these rules. The Create Sales Invoice button on the Opportunity page and the Convert to Credit Note button on the Sales Invoice page use the standard behavior by default, or the customized behavior if these integration rules are created.
  • Integration rules applied to the Convert to Credit Note function should not include any mappings for tax calculation because tax details are copied over from the sales invoice. If you do attempt to apply a rule that includes mappings for tax calculation, an error message will be displayed and the rule will not run.

Type 2b - Set up field mapping and custom buttons

Do you want users to be able to create sales invoices or credit notes from any object in your Salesforce organization?

You can create integration rules to specify the source data and to help you set up the appropriate custom buttons to use the mapped information to create sales invoices or credit notes. The source objects can be standard Salesforce objects, FinancialForce objects, or even your own custom objects.You might, for example, want to allow your staff to create sales invoices directly from custom objects you have created for work orders in your organization.

Note:
  • You must define target and source objects.
  • If you define a target detail object, it must have a master-detail relationship with the target object.
  • All mandatory information for sales invoices or credit notes must be mapped to the target objects in order to create these sales documents. See "Sales Invoice Fields" and "Sales Credit Note Fields" for more information.

This type of rule allows you to view and copy the JavaScript code needed to create the custom button to be placed on the source object. Clicking the completed custom button will create an "In Progress" sales invoice or sales credit note.

For more information about creating custom buttons, see the Salesforce Help topic "Defining Custom Buttons and Links".

Type 2c - Set up field mapping for automatic generation of cash entries or sales invoices

  • Do you want to automatically generate and post one or more cash entries from the data contained in a custom object?
  • Do you want to automatically generate and post sales invoices from the data contained in any pair of master and detail objects?

You can create integration rules to map fields from one, single object to the cash entryClosed A record of money received from, or refunded to, your customers, often in the form of cash or a check. Also used to record payments to and refunds from vendors. and cash entry line item objects so that you can generate one or more cash entries from the data held on the object.

You can also create integration rules to map fields from any pair of master and detail objects to the sales invoice and sales invoice line item objects so that you can generate sales invoices from the data held on the source objects.

The Run Integration Rule tab allows you to select this type of integration rule then run it to create and post sales invoices or cash entries.

Note:
  • The target object, target detail object, source object and source detail object must all be defined on the integration rule.
  • You must select the field on the source object that you want to be updated with the document number. This field must be a lookup to the target object.
  • You must select the field on the source object that you want to indicate that the record has been processed. This field must be a checkbox.
  • If you have encryption enabled in your org, encrypted fields are not displayed in the list of fields available for use as selection criteria on this type of rule. See Shield Platform Encryption for more information.
  • All mandatory information must be mapped to the target objects in order to create and post the sales invoices or cash entries. See "Cash Entry Fields" and "Sales Invoice Fields" for more information.
  • You must also map and provide values for the customer reference field for sales invoices, and the account reference field for cash entries. If you want to use background matching, these fields must have unique identifiers which match each sales invoice to a specific cash entry account line.
  • You cannot create income schedules and payment schedules on automatically generated sales invoices.
  • All automatically generated sales invoices and cash entries are posted and have a status of “Complete”.

Automatic Generation of Cash Entries

A single, custom source object must be used for the generation of cash entries. This object must contain all needed information for the cash entry master and detail sections and be designated in the integration rule as both the source object and the source detail object.

Integration rules have a specific checkbox used to indicate if you want every record in the source object to create its own individual cash entry or if you want to create one cash entry with multiple account lines where each line corresponds to a record in the source object.

Automatic Generation of Sales Invoices

All information mapped from the custom object, apart from invoice status, is used to create sales invoices.

The unit price for line items must be provided on the custom object, as it isn't retrieved from the Salesforce price book.

Automatic Generation of Sales Credit Notes

If you want to use an integration rule to create sales credit notes, be aware that you will not be able to convert a sales invoice to a sales credit note using the Convert to Credit Note button. This is because when using the Convert to Credit Note button, the sales credit note must be created using the information (including tax details) on the sales invoice but the integration rule will try to apply the tax details that have been mapped in the rule. This will result in an error message saying that you cannot map the tax fields. You therefore have two options:

  • Keep the integration rule but create your sales credit notes manually instead of using the Convert to Credit Note feature
  • Delete the integration rule so that the Convert to Credit Note feature can be used.