Workflow Actions in Import and Export Scenarios

A workflow is a process of changing the state of an entity as a result of a user performing an action. A workflow action changes the state of an entity. For example, the status of an opportunity can be changed based on the actions a user has performed on the opportunity. For an MYOB Acumatica form, a predefined workflow or a custom workflow can be defined in the system. For more information about workflows and workflow actions, see Action Configuration: General Information in the Customization Guide.

To specify the particular state of an entity by using an import or export scenario, you need to use workflow actions in the scenarios. In this topic, you can find information about the use of workflow actions in import and export scenarios.

Note: Simple import scenarios cannot use workflow actions. For details about simple import scenarios, see Simple Scenarios for Data Import.

Workflow Actions in a Mapping

To specify a workflow action in a mapping on the Import Scenarios (SM206025) or Export Scenarios (SM207025) form, you can use one of the following approaches:

  • Select the summary object as the target object (in an import scenario) or the source object (in an export scenario), and specify the action name in the Field / Action Name column. This is the standard way to call actions in import and export scenarios. For details, see Actions in Import Scenarios.
  • Select the summary object as the target object (in an import scenario) or the source object (in an export scenario), select the <Action: Transition> action in the Field / Action Name column, and specify the type of transition that corresponds to the workflow action in the Source Field / Value column (for an import scenario) or the Target Field / Value column (for an export scenario). With this approach, you can use a formula to specify the type of transition.

Conditional Workflow Actions

To implement conditions in workflow actions, you use the <Action: Transition> action in the Field / Action Name column and a formula in the Source Field / Value column (for an import scenario).

Suppose that you want to import an invoice that has the On Hold status and that has multiple detail lines. Further suppose that when you create an invoice on an MYOB Acumatica form, the status of this invoice is Open. That is, on the Accounts Receivable Preferences (AR101000) form, the Hold Documents on Entry check box is cleared.

You enter the settings in the two rows on the Mapping tab of the Import Scenarios (SM206025) form, as described in the following table.

Table 1. Example of the Mapping with Conditional Workflow Actions
Target Object Field / Action Name Source Field / Value
Invoice Summary Status =[Document.Status]
Invoice Summary <Action: Transition> =IIf([Document.Status]='H', '','PutOnHold')

To change the status of the invoice to On Hold, you need to invoke the PutOnHold action. If the invoice contains multiple detail lines, the system imports these lines one by one. If you invoke the PutOnHold action for the first detail line and then try to invoke this action for the second line, the system displays an error that the action is disabled (because the invoice is already on hold).

To continue importing the detail lines, you specify the formula (see the table above) to invoke the PutOnHold action only once for the invoice, when the status of this invoice is not yet On Hold. The formula makes the system check the status of the invoice, and if the status is not On Hold, the system changes it to On Hold.

Workflow Actions with Dialog Boxes

If a workflow action displays a workflow dialog box with the parameters of the action, you can specify these parameters by using the Transition Parameters object as the target object in an import scenario. The parameters must be specified before the workflow action. The Transition Parameters object is not available in export scenarios.

For example, to execute the Accept action on the Leads (CR301000) form for a qualified lead, you enter the settings shown in the following table in the two rows on the Mapping tab of the Import Scenarios (SM206025) form. The first row specifies the value in the Details dialog box, which opens when a user clicks Accept.

Table 2. Example of the Mapping of a Workflow Action with a Dialog Box
Target Object Field / Action Name Source Field / Value
Transition Parameters Reason ='Qualified by Marketing'
Lead Summary <Action: Transition> ='Accept'