Designer
Integrating CPQ Designer
Designer allows product marketing teams to manage the entire product lifecycle with limited need for IT resources. Within a single collaborative repository, it’s easy to quickly create and update products, sales and configuration scenarios, pricing and promotions logic and marketing, sales and technical rules.
Accessible using a standard web browser, it uses an innovative approach called Process-based Modeling™ that combines ease of use and collaborative activities allowing to move the modeling process from a back-office IT dependent activity to one that is more accessible to business users.
Moreover, the Designer could be customized in order to:
- Perform “on demand” calls to external services,
- Generate customized reports
- Delegate the authentication to your LDAP (when using the Designer)
- Be synchronized with external sources such as ERP, Billing systems
How to use external services?
Since version 8.0, the Designer allows integrating external services:
- External Business Services: these services allow for Java classes to be called from within the menu toolbar
- Document Generation Services: these services allow for reporting services called from within the menu toolbar
Those services are defined thanks to the service.properties file.
External Business Services
In order to add a business service, proceed as follows:
- Write a Java class that respects the following interface:
com.cameleon.modelingui.services.plugins.ExternalService
- Set up a “business service” section in the service.properties file
The com.cameleon.modelingui.services.plugins.ExternalService interface to be implemented is the following:
package com.cameleon.modelingui.services.plugins;
/**
* The default external service behavior
* @author PROS
*/
public interface ExternalService {
/**
* The execute method. You have to implement this method.
* @param parametersIntegration guide
* The {@link IExternalServiceInputs}
*/
void execute(IExternalServiceInputs parameters);
/**
* Get the result outputs
* @return The {@link IExternalServiceOutputs}
*/
IExternalServiceOutputs getExternalResultOutputs();
/**
* The process is done
* @return the process is done
*/
boolean isProcessDone();
}
The input parameters implement the following interface:
package com.cameleon.modelingui.services.plugins;
import java.util.Locale;
import com.cameleon.framework.business.basic.PK;
import com.cameleon.modeling.administration.user.User;
import com.cameleon.modeling.framework.versioning.Version;
/**
* The External Service Inputs Structure
* @author PROS
*/
public interface IExternalServiceInputs {
/**
* The PK of the current process
* @return the PK of the current process
*/
PK getCurrentProcessPK();
/**
* The current step name
* @return the current step name
*/
String getCurrentStepName();
/**
* The current open object PK
* @return the current object PK
*/
PK getCurrentObjectPK();
/**
* Get the current language in which the model data are displayed
* @return the current data model language
*/
Locale getCurrentLanguage();
/**
* Get the current calling/connected user
* @return the current user
*/
User getCurrentUser();
/**
* Get the current model version
* @return the current model version
*/
Version getCurrentModelVersion();
}
The resulting output will have to implement the following interface:
package com.cameleon.modelingui.services.plugins;
/**
* The External Service Result
* @author PROS
*/
public interface IExternalServiceOutputs {
/**
* The Result Message
* @return the result message
*/
String getResultMessage();
/**
* The Result Log
* @return the result log
*/
String getResultLog();
/**
* The Process Error
* @return true if there is an error
*/
boolean hasError();
}
The business service section template is the following:
Business Service Configuration
| #REPEAT THE FOLLOWING INFORMATION FOR EACH NEW BUSINESS SERVICE | |
|---|---|
| business.IDENTIFIER.en_US | Description of the business service for locale en_US. |
| business.IDENTIFIER.fr_FR | Description of the business service for locale fr_FR. |
| business.IDENTIFIER.javaClass | The java class that will be called when executing the business service. |
| business.IDENTIFIER.refreshStep | Indicates if the business service execution requires updating the current step. If yes, the Designer user interface will be reloaded after the business service execution. | Possible values: yes, no |
| business.IDENTIFIER.logFile | The absolute URL pointing to a file into which the java class will log information. | Sample value: file:///tmp/log.txt |
| business.IDENTIFIER.showConfirmation | Indicates whether the result of the external service is shown in a popup at the end of the execution, or not. | Possible values: yes, no |
| business.IDENTIFIER.iconURL | Indicates the URL where the icons are located for the plugin. Icons should be located in the following folder: http://<cpq_home:port>/modelingUI/localresource/localresources/theme/toolbar/buttons/. | Sample URL: http://<cpq_home:port>/modelingUI/localresource/localresources/theme/toolbar/buttons/btnPlugin.gif |
Cloud deployment: For more details on how to deploy external services, please log a ticket on PROS Support Helpdesk.
External Reports
In order to add a report generation service, proceed as follows:
- Create a new reporting model
- Set up a “business service” section in the services.properties fileIntegration guide
Report Service Configuration
| #REPEAT THE FOLLOWING INFORMATION FOR EACH NEW REPORT SERVICE | |
|---|---|
| service.IDENTIFIER.en_US | Description of the business service for locale en_US. |
| service.IDENTIFIER.fr_FR | Description of the business service for locale fr_FR. |
| service.IDENTIFIER.reportTitle | The title of the report |
| service.IDENTIFIER.reportFileURL | The absolute URL pointing to a zip file which contains the main report and all its sub-reports | Sample value: file:///reports/report.zip |
| service.IDENTIFIER.reportEntryPoint | The main report in the zip file holding the report and its subreports | Sample value: myMainReport.jrxml |
| service.IDENTIFIER.reportOutputFormats | The list of output formats. Currently, only “PDF” is supported. | Sample value: PDF |
| service.IDENTIFIER.customReportParamX | Identifies a parameter to pass to the report engine. This attribute can be repeated for every parameter to be taken into account. |
Cloud deployment: For more details on how to deploy external reports, please log a ticket on PROS Support Helpdesk.
How to use LDAP authentication?
It is possible to log into the Designer and have the users authenticated by an external LDAP system. In order to do this, the following interface has been provided:
interface ExternalLoginControl {
/**
* Return the login Authorization for the given user
*/
LoginAuthorization AuthorizeLogin(String User, String Pwd, Locale locale)
}
interface LoginAuthorization {
enum {
ACCEPTED,
REFUSED,
LIMITED
} AuthorizationLevel
/**
* Gets the authorization level. If returned levl is not {@link
#AuthorizationLevel.ACCEPTED}, the method {@link #getMessage} will provide
explanations to display to the user.
* @return An authorization level
*/
AuthorizationLevel getAuthorization() ;
/**
* Return the error code and error message to display.
*/
framework.Message getMessage();
// optionally:
/**
* Returns the default role to use for {@link #AuthorizationLevel.LIMITED}
* access overriding the default {@code Modeling.UI.limitedRole}.
* Returns {@code null} if value of parameter
* {@code Modeling.UI.limitedRole} must be used
* @return {@code null} if application default role must be used, a string
identifying a role in the application otherwise
*/
String getLimitedRoleId();
}
So in order to use your LDAP authentication to connect to the Designer, follows:
- Create a new “external login control” java class
- Set up a “External Login Control Classes” section in the “cameleon.properties” file
Once your own login control is implemented, this class must be associated to the Designer in the cameleon.properties file like in the following example:
#===================================== External Login Control Classes
modeling.ui.externalLoginClass= LoginControl
modeling.ui.limitedRole= DefaultRole
The following is a sample externalLoginControl class:
package com.cameleon.ldap;
import java.util.Locale;
import com.cameleon.framework.commons.log.Message;
import com.cameleon.framework.login.ExternalLoginControl;
import com.cameleon.framework.login.LoginAuthorization;
/**
* This class defines a hook used by CPQ to login users
* *
@author theAuthor
*/
public class LoginControl implements ExternalLoginControl{
/**
* {@inheritDoc}
*/
{
Cloud deployment: For more details on how to deploy LDAP authentication, please log a ticket on PROS Support Helpdesk.
How to sync with external data sources?
For consistency of the overall information system, the necessity to synchronize CPQ repository with external data sources appears frequently.
CPQ provides different method to implement these exchanges:
- By export / importNote: The XML format is recommended to automate the synchronization of repositories. The XLSX format is more readable and mainly use for massive manual updates.
- By using the CPQ modeling APIs
Usage of export and import
CPQ is able to generate different export files:
| EXCHANGE FORMAT | CONTENT | DESCRIPTION |
|---|---|---|
| Excel file | DELTA | Create an excel export file that includes all the differences that occur in the exported version since the last version |
| FULL | Create an excel export file that includes all the objects that are valid regarding the exported version | |
| FULL + filters | Create an excel export file that includes all the objects that are valid regarding the exported version except the ones that have been explicitly excluded thanks to the use of filters. | |
| XML file | DELTA | Create an xml export file that includes all the differences that occur in the exported version since the last version |
| FULL | Create an xml export file that includes all the objects that are valid regarding the exported version | |
| FULL + filters | Create an xml export file that includes all the objects that are valid regarding the exported version except the ones that have been explicitly excluded thanks to the use of filters. |
Those files can be generated from the Designer and can also be imported into it.
| USE CASE | XLSX EXPORT | XML EXPORT |
|---|---|---|
| Mass update/creation/deletion of products | □ (manual) | □ (automated) |
| Mass update/creation/deletion of product links | □ (manual) | □ (automated) |
| Mass update/creation/deletion of pricing & discounts | □ (manual) | □ (automated) |
| Manual Translation updates | □ | |
| Manual initialization of new offer/configuration process/catalog from an existing one | □ | |
| Repository/version archive | □ | |
| Repository/version distribution | □ |
The goal of this format is to provide an optimized way to update CPQ product repository with specific/precise information (e.g. If a subset of data of a standard item has to be updated, only this information can be sent into CPQ instead of sending all the properties of the standard item). Please check APPENDIX A – Merge XML format
For more details on how to export and import, the details of the file formats, please refer to CPQ Designer Guide.
Import and export web services
In order to automate the distribution (export and import) of versions, CPQ provides dedicated web services.
These services are described in the javadoc of the application in the com.cameleon.webservice.eximp package.
As an example, the “eximp” web service is able to create a version based on the content of a given import.
For more details on how to use these web services, please refer to the javadoc. SOAP and REST API are available for this service. com.cameleon.webservice.exim
