Create custom actions for performing specific tasks. Know how to add it to a workflow and configure it, how to test custom actions, and the additional actions you can perform on a custom action.
Each connector supported by IBM webMethods Integration provides several actions which you can use in your workflows to automate your tasks. You can create your own custom actions and also edit/delete those custom actions.
Creating Custom Actions
No subtopics in this section
Creating Custom Actions is very easy with IBM webMethods Integration. We will understand how to create Custom Actions, with the help of an example:
Let’s say you want to create a Custom Action for Salesforce CRM application. To do this, add the Salesforce CRM connector on canvas and configure an Account.
To configure an Account, select the Select Action field. From here, you can create a new account, or access an existing account. For demo purposes, let’s create a new account, AccountCreate.
To create a new account, click the + button. The Add Custom Action screen appears.
Let’s look at the steps involved in setting up the custom actions.
Connect to an account.
Select Authentication type: Select an authentication type, for example, OAuth V2.0 (Authorization Code Flow).
Authorize updateAccounts: Select an account for executing the selected action.
Name: Provide a name for the account, for example, AccountCreate.
Description: Enter the description of the account.
Click Next.
Select an action.
Select an action to be performed, for example, create.
Click Next.
a. Select the Business Object to be associated with the action create and then click Next.
b. Select the Data Fields for the Business Object you have chosen in the previous step and then click Next.
Note
Data fields appear only for certain applications and actions. Mandatory data fields for the Business Object are selected by default and cannot be cleared.
Confirm Action.
Once you confirm the action value, click Done.
Next, you will be able to view the new action in the drop down list.
Once this is done, click Next. You will be redirected to the AccountCreate action configuration window. It is mandatory to provide values for all the required fields while configuring an action. You can also provide values for optional fields as per your requirements.
Once this is done, click Next. You will be redirected to the Test this action window where you can check if the action is working as expected before executing the workflow. After this, click Done.
If you have configured the action correctly, you will see the output data for the action.
This will give you an idea of how your action will work when used in a workflow and which keys are returned in the output of the trigger. This output data will then be used to configure the rest of the workflow.
With this, our custom action is successfully set up. Now click on the Save button located at the top-right corner of the canvas to save the workflow.
You can now use this account in any workflow created under the same project.
Editing and Deleting Custom Actions
No subtopics in this section
You can edit or delete the existing accounts.
To edit an account, select an account and then click the Edit button. Editing involves modifying the authentication type, account description, actions, business objects associated with the operation, and changing the account name and data fields as well.
Once you have made the changes, click Save.
To delete the operations, select an account and then click the Delete icon.
Using Custom Fields
No subtopics in this section
Creating Custom Fields is very easy with IBM webMethods Integration. Using the Custom Field functionality, you add new custom data fields. A custom data field can be a String, Integer, Float, Double, Long, Boolean, Short, Document, or an Object.
While adding custom data fields as the child of another custom field, the field must be unique among all the children of the parent field. The newly added custom field will then be added to the existing data fields list and, if selected, will be sent to the API while creating a custom operation and will get reflected in the input/output signature along with other selected fields.
Now that we know what custom fields are all about, let us see how to add custom data fields. To do so, follow the steps given below:
Add the Salesforce CRM connector to the canvas.
Once done, configure your Salesforce CRM action by double-clicking the Salesforce icon. From here, you can create a new custom action, or access an existing custom action.
For demo purposes, let’s create a new custom action, query.
Click the + button. The Add Custom Action screen appears.
From here, you can create a new account, or access an existing account. For demo purposes, let’s create a new account create.
In the Add Custom Action configuration form that appears, provide the details as given below:
Select Authentication type: Select an authentication type, for example, Credentials.
Authorize AccountCreate: Select an account for executing the selected action.
Name: Provide a name for the account, for example, create.
Description: Enter the description of the account.
Click Next and select an action to be performed, for example, create.
Click Next and select the business object to be associated with the action create. Business Objects and Interactions appear only for certain applications and actions.
Click Next. To add the new custom data fields FirstName and LastName to use for the business object Contact under Account, click Add Data Field.
In the Add Data Field window, add the new custom data fields Firstname and Lastname. Select Required option to indicate whether the field is required.
Provide the name and type of the data field to define the structure and content of the data fields. In the above example, we have added “ens:Contacts” as the data field and data type as “document” which is of a parent hierarchy.
Click Next. Similarly provide “ens:FirstName” and “ens:LastName” fields and data type as “string” for a child hierarchy.
Click Next. Confirm the action, and then click Done.
You will be redirected to the main screen. Click Next. You will be redirected to the action configuration window.
In the select field, query the custom data field FirstName and LastName for the business object Contact under Account.
Click Next. You will be redirected to the Test this action window where you see the custom data field FirstName and LastName for the business object Contact under Account.
Click TEST. If you have configured the action correctly, you will see in the output data the added custom data field FirstName and LastName. This will give you an idea of how your action will work when used in a workflow and which keys are returned in the output of the trigger. This output data will then be used to configure the rest of the workflow.
With this, our custom field is successfully set up. Now click on the Save button located at the top-right corner of the canvas to save the workflow. You can now use this account in any workflow created under the same project.
Performing a Field Lookup in Salesforce SOAP Connector
No subtopics in this section
Each connector supported by IBM webMethods Integration provides several actions which you can use in your workflows to automate your tasks. Using IBM webMethods Integration, you perform a field lookup that retrieves the list of field values from the selected business object based on the authorization selected. The Field Lookup feature eliminates the need to manually enter the input data associated with your third-party account resources while configuring an action. Let’s understand this with the help of an example.
Let’s say we want to delete a particular record deleteBusinessObjects from the third-party account using the Field Lookup feature. To do this, follow the steps given below:
Add the SalesForce CRM connector to the canvas.
Select the deleteBusinessObjects action.
Provide the necessary details and configure the account for the specified connector.
In the deleteBusinessObjects configuration window, click the drop-down list to retrieve the list of business objects of the Salesforce account. Now, select a business object. In this example, we have chosen Account.
Add an ID field to specify the ID of the account record to delete. Click the drop-down list to retrieve the list of account records IDs from the configured Salesforce account. Now select a record ID.
Filter the IDs list by display name by specifying a full or partial name.
Select Load More option to load more account record IDs.
Once this is done, click on Next. You will be redirected to the Test action window where you can check if the action is working as expected before executing the workflow.
After this, click Done. This removes the selected record from the third-party account.
Using Business Parameter
No subtopics in this section
When creating a custom action, you use the business parameter configuration to select a key field to create or update the records from the existing operation. Performing an Upsert action in IBM webMethods Integration allows you to insert or update any information for the Salesforce connector using the business parameter.
Note
Before you use the Upsert operation, ensure that you configure the External ID field name for the object to which you are trying to upsert. This external ID will be used by the Salesforce connector to associate the records during the Upsert operation.
Let’s say you want to perform an upsert operation on Salesforce object Account. To do this, add the Salesforce CRM connector to the canvas and configure an Account.
To configure an Account, select the Select Action field. From here, you can create a new account, or access an existing account.
Click Next and select an Action to be performed, for example, upsert.
Click Next and select the business object to be associated with the action upsert.
Click Next and select the data fields for the business object you have chosen in the previous step.
The selected data field is added as an external ID. Use this data field to perform an “upsert” action.
Click Next. Confirm the action, and then click Done.
Select the new configured field to perform the upsert operation, and click Done.
All the fields configured as external ID in Salesforce CRM will be shown here. If you want more configuration fields here, you must configure the respective fields in Salesforce CRM.
Click Done, you will be redirected to select action window.
Click Next, you will be redirected to the action configuration window, where you add relevant details to execute the action.
Click Next, to execute the action.
Click Test.
If you have configured the action correctly, you will see the output data for the action. This will give you an idea of how your action will work when used in a workflow and which keys are returned in the output of the trigger. This output data will then be used to configure the rest of the workflow.
Click Done.
With this, our business parameter is successfully set up. Now click on the Save button located at the top-right corner of the canvas to save the workflow. You can now use this account in any workflow created under the same project.
Working with Multiple Business Objects
No subtopics in this section
You can add multiple business objects with their data fields while creating a custom action. Let’s now understand how to create multiple business objects for a custom action.
Here, in our example, we will create multiple business objects for the Salesforce CRM application.
To do so, follow the steps given below:
Connect to an account
Add Salesforce CRM connector on canvas and connect it to the Start and Stop icons. Next, double-click the Salesforce CRM icon and click the + button to start creating a custom action. The Add Custom Action configuration screen appears where you will need to provide the following details:
Select Authentication type : Select an authentication type, for example, OAuth V2.0 (Authorization Code Flow) .
Authorize Salesforce CRM: Select an account for executing the selected action.
Name : Provide a name for the account.
Description : Enter the description of the account.
Click Next.
Select the operation
Select the operation - createMultiple from the options listed in the Operation step.
Note
The operations for Multiple Business Object appear for certain applications and actions only.
On clicking Next, the Add Multiple Business Object screen appears.
Next, click +Add to add a business object and its data fields.
Select the Business Object
Select the business object to be associated with the selected createMultiple operation.
Here, in our example, we will select ‘Account’ as our first business object and then click Next.
Select the Data Fields for the Business Object Select the data field(s) for the chosen business object.
On clicking Next, you will be redirected to theAdd Multiple Business Objectscreen where you will see the details of the newly created business object. Here, you will see the name of the business object created, the number of data fields added, and the actions (Edit or Delete) that can be performed on the business object.
To create a second business object, click on +Add and repeat the steps mentioned above.
Note
You can change the order of objects within the list as per your requirements with the drag-and-drop functionality. To reorder the list, click and hold the drag icon that appears on the left of the relevant object and then drag-and-drop it to a required position in the list.
Confirm the action
The next step is to verify and confirm the custom action. Once this is done, click Done .
Working with Interactions
No subtopics in this section
IBM webMethods Integration offers an Interactions feature that enables you to define multiple business rules and logic for custom actions.
Here, in our example, we will create interactions for the Microsoft Dynamics 365 CRM application.
To do so, follow the steps given below:
Connect to an account
Add Microsoft Dynamics 365 CRM connector on canvas and connect it to the Start and Stop icons. Next, double-click the Microsoft Dynamics 365 CRM icon and click the + button to start creating a custom action. The Add Custom Action configuration screen appears where you will need to provide the following details:
Authorize Microsoft Dynamics 365 CRM: Select an account for executing the selected action.
Name : Provide a name for the account.
Description : Enter the description of the account.
Click Next.
Select the operation
Select the operation you want to perform from the options listed in the Operation step.
Here, in our example, we will select the operation - compositeBatch and then click Next .
Note
Interactions appear for certain applications and actions only.
On clicking Next, the Add Interactions screen appears.
Add Interactions
Add Interactions for the operation you have chosen in Step 2. To add your first Interaction, click +Add.
Select the interaction to be associated with the selected operation.
Here, in our example, we will select ‘query’ to be associated with ‘compositeBatch’ and then click Next .
Next, select the business object to be associated with the selected operation.
Here, in our example, we will select ‘accounts(Microsoft.Dynamics.CRM.account)’ as our business object and then click Next .
Now, select the data fields for the selected business object and click Next.
On clicking Next , you will be redirected to the Add Interactions screen where you will see the details of the newly created Interaction. Here, you will see the name of the Interaction, the business object created, the number of data fields added, and the actions (Edit or Delete) that can be performed on the Interaction.
To create a second Interaction, click on +Add and repeat the steps mentioned above.
Note
You can change the order of interactions within the list as per your requirements with the drag-and-drop functionality. To reorder the list, click and hold the drag icon that appears on the left of the relevant interaction and then drag-and-drop it to a required position in the list.
Confirm the action.
The next step is to verify and confirm the custom action. Once you do that, click Done.
With this, you have successfully created interactions for your custom action.