WordPress landing page integration with custom object in bpm’online

Problem Statement
During a lead generation process of a sales / marketing team, they should have the ability to capture as much as information about their lead in the bpm’online CRM. Currently bpm’online supports to capture few of the standard sections like leads, cases, orders & event registration through a WordPress integration of landing pages. This blog is about how to capture additional information to be gathered via landing pages other than the standard sections available as of today.

Solution
In this blog we will learn about the steps that needs to be followed to integrate WordPress landing page with a custom object in bpm’online.

Steps for integrating a WordPress landing Page to custom section

bpm’online configurations
Create the custom object to which landing page needs to be integrated. For example; create an object “UsrAdditionalCustomerData” (sample object name for explanation purpose)

In the [Landing pages and webforms] section, you can select one of the default webforms available as given below (Fig.1).

Fig. 1

In order to add new registration form for the custom object:

1. Add a new type “Additional Customer Data” landing page to the “Landing types” lookup, which is connected to the custom section.

Fig. 2

2. After adding a new web form in the “Landing types” lookup, use the Section Wizard to add a new page in the [Landing pages and web forms] section for the newly added type. To open the Section Wizard, go to the [Landing pages and web forms] section, and in the [View] menu select [Open section wizard] (Fig.3 & Fig.4).
Fig.3

Fig.4

3. Add new additional customer data web registration form in the section wizard (Fig.5). After saving you can see the additional customer data web registration form in the new dropdown (Fig.6).
Fig.5

Fig.6

Creating the landing page for custom object
Add new additional customer data web from and save the record. You can get the landing Id for the saved web page from the link (Fig.7). This landing Id can be used to integrate the landing page and web form in WordPress.

Fig.7

Integrating the WordPress Page to Custom Object

Install bpm’online plugin for WordPress (gravity forms, Contact form7). The steps to integrate bpm’online to a WordPress contact form is mentioned in the link below.
https://community.bpmonline.com/articles/bpmonline-plugin-wordpress-gravity-forms-contact-form-7?_ga=2.73954770.153193264.1562563622-1951839029.1560317595
In mapping of the fields (WordPress), 3rd party fields should be the column names in the UsrAdditionalCustomerData table (custom object) (Fig.8).
Fig.8

Use the Landing Id (Fig.7) as the form Id and the column names of the additional customer data table for mapping the landing page fields.

Processing the submitted data in bpm’online

After integration, when a new set of data is submitted in the additional customer data landing page, a corresponding record will be created in UsrAdditionalCustomerData object.
You can write a process to link the newly created record with the corresponding lead automatically or, can give a page where the sales team can review the submitted data and connect with corresponding lead.

Benefits
The solution helps in acquiring additional details (like customer requirement, alternate address, alternate contact information, additional company information etc.) of potential leads from a WordPress landing page.
To learn more on how AgilizTech does customization for bpm’online visit our bpm’online blog were we have explained different ways of customization for a business as per their requirements.

AgilizTech’s customization for bpm’online – Look up filtration based on flag in mobile app

In this fourth post of the series we will be discussing how to list only active products in the product selection page of the bpm’online sales enterprise edition mobile app.

The product section in mobile app has provision to activate or inactivate the products. In the desktop version if a product is inactivated, it will not list in any product selection page. In mobile page, however by default the product will be listed.

Business use case:

To display active products only in the production selection while booking orders through bpm’online mobile app.

Product:  bpm’online sales enterprise edition

Applicable for Version: 7.13 & above

Below is the desktop version of bpm’online sales enterprise wherein you can see that the Product Inactivated does not appear in the product selection page.

Fig 1: Product Inactivated

Whereas in the product selection page of the bpm’online mobile app the inactive product will be listed. This can be corrected by applying a certain code.

Fig 2: Before applying code change, product will be listed in mobile product lookup

Fig 3: After applying the code change, product will not be listed in lookup

Filtration of lookup columns based on the flag or a column is demonstrated below.

You should be knowing in which Workplace the changes need to be done. Select the workplace first to apply the changes.

In Custom package > MobileApplicationManifestDefaultWorkplace

For Example:

UsrMobileFilterModelConfig – If this is the business rule created for filtering the columns based on other columns, then you will have to mention this name in Model > Object’s Page Extension section.

Refer below code:

“Models”: {
“Order”: { {
“RequiredModels”: [
“Order”,
“Account”,
“OrderStatus”,
“OrderPaymentStatus”,
“OrderDeliveryStatus”,
“Currency”,
“DeliveryType”,
“PaymentType”,
“LeadType”,
“SocialMessage”,
“OrderProduct”,
“Product”,
“Unit”,
“Pricelist”,
“OrderVisa”,
“VisaStatus”
],
“ModelExtensions”: [],
“PagesExtensions”: [
” UsrMobileFilterModelConfig “, // Module Name
“UsrMobileOrderGridPageSettingsDefaultWorkplace”,
“UsrMobileOrderRecordPageSettingsDefaultWorkplace”
]
},
}

Create a module with the specified name. In this example it is UsrMobileFilterModelConfig.

In UsrMobileFilterModelConfig. module write the business event for Accessibility.

Find the code below.

Terrasoft.sdk.Model.addBusinessRule(“OrderProduct”,{
ruleType:Terrasoft.RuleTypes.Filtration,
events:[
Terrasoft.BusinessRuleEvents.Load,
Terrasoft.BusinessRuleEvents.Insert,
Terrasoft.BusinessRuleEvents.ValueChanged
],
triggeredByColumns:[“Product”],
filters:Ext.create(“Terrasoft.Filter”,{
modelName:”Product”,
property:”IsArchive”,
value:false
})
});

Here we are filtering “Product” lookup column in Order Products, based on Is Archive field in the product object. If the value is false, product will be listed; if value is correct i.e. if product is inactive, it won’t be listed. This Filtration should work while inserting new order, i.e. selecting a product for new order and while editing order product list for an existing order.

The event handling is explained below:
Find the code below.

events:[
Terrasoft.BusinessRuleEvents.Load, //On Data Load
Terrasoft.BusinessRuleEvents.Insert, //upon inserting new
Terrasoft.BusinessRuleEvents.ValueChanged //While Editing
]

Hence, if the above code is applied the inactive products will not be listed in the mobile product look up.

Click here to navigate to the main blog post which contains the complete list of bpm’online customization use cases.

AgilizTech’s Customizations for bpm’online – Conditionally Hide/Show Fields in bpm’online mobile app

In the second post of this series, we will be exploring a way to achieve conditional visibility of fields in the bpm’online sales enterprise edition mobile app.

Let us take a scenario where the Sales Manager is approving an order in the mobile app. As per business rule, once the Manager has approved the order, he should not be able to reject it. Currently, for approval purpose, ‘Order approvals’ detail is added in ‘order section’ in mobile app. The app allows manager to choose appropriate status in this detail (‘Approved’ or ‘Rejected’). By default, the status will be ‘To Set’. App allows manager to choose ‘Approved’ or ‘Rejected’ status, even after the order has been approved or rejected, which is incorrect as per business rule.

                               

We can correct this workflow by hiding the ‘order approval’ status option once the order has been approved/rejected.

Here are the steps to achieve this:
1. In the System Designer, navigate to Advanced Settings and select Configuration.


2. Here, in Custom Package, select the Mobile App Workplace, where you want the change to be in effect (here we have mentioned default workplace; if you have created a separate workplace for approvals, select the same).

For example, Custom package > MobileApplicationManifestDefaultWorkplace


3. Mention the visibility Module name in the object’s Page Extensions Section.

For Example:
UsrOrderMobileBusinessRules – If this is the business rule created for hiding the columns, then mention this name in Model > Object’s Page Extension section.

Here’s the code:

“Models”: {
“Order”: { {
“RequiredModels”: [
“Order”,
“Account”,
“OrderStatus”,
“OrderPaymentStatus”,
“OrderDeliveryStatus”,
“Currency”,
“DeliveryType”,
“PaymentType”,
“LeadType”,
“SocialMessage”,
“OrderProduct”,
“Product”,
“Unit”,
“Pricelist”,
“OrderVisa”,
“VisaStatus”
],
“ModelExtensions”: [],
“PagesExtensions”: [
” UsrOrderMobileBusinessRules “, // Module Name
“UsrMobileOrderGridPageSettingsDefaultWorkplace”,
“UsrMobileOrderRecordPageSettingsDefaultWorkplace”
]
},
//As we are hiding the ‘OrderVisa’ Status Field in the order screen, the OrderVisa Object is             //also required. In the Model Extension, we have also given VisaStatus Object as this is a              //lookup table for OrderVisa table’s Status field.
“OrderVisa”:{
“ModelExtensions”: [
“VisaStatus”
],
“PagesExtensions”: []
},
}

 

In the UsrOrderMobileBusinessRules module, write the business event for visibility.

The code is as given:

Terrasoft.sdk.Model.addBusinessRule(“OrderVisa”,{
ruleType: Terrasoft.RuleTypes.Visibility,
events:[Terrasoft.BusinessRuleEvents.Load],
conditionalColumns: [
{name: “Status” , value: “3462594d-77a7-4b0a-874a-6d8b54b293bc”}
],
triggeredByColumns: [ “Status” ] ,
dependentColumnNames: [ “Status” ]
});

 

Here we are displaying Status field, if the status is ‘To Set’. In case of the other two statuses, (i.e. ‘Approved’ & ‘Rejected’) the ‘Order Approval’ detail, with ‘Status’ field will be hidden, which will stop the manager from changing the status of an approved order to rejected or vice-versa.
Here the ID value of ‘status’ is hard coded in the above code. The ID value may be different in different instances; hence the ID value should be cross verified while using this code snippet.

Click here to navigate to the main blog post which contains the complete list of bpm’online customization use cases.