Category Archives: Company Update

EMAIL TO CASE: PRIORITISING CASE EMAIL ROUTING

Imagine if you are providing support with different level of subscriptions and would like to have different priority given to different level of support.
ie: Gold Member Subscription will have higher priority over Silver Member Subscription.
Prioritising Email to Case Routing
By using Email to Case routing, you will be able to receive cases from different subscriber with different priority set. For example:

  • Email from support-gold@wdcigroup.net needs to have a high priority
  • Email from support-bronze@wdcigroup.net needs to have a medium priority
  • Email from supportus@wdcigroup.net needs to have a low priority

Below image is where you can set the Case priority coming from different email address. servlet.FileDownload  Once routing is set up, support sent to different email address will automatically have priority populated and Support engineers can work on the Cases accordingly.

Salesforce Apex: Namespace and Field Name in AggregateResult

In Salesforce SOQL, we can use the aggregate function to summarize data in query. When an aggregate function is used, Salesforce will return the result as AggregateResult object and we can retrieve the value by calling AggregateResult.get(‘field name’). For example:

for(AggregateResult ar : [select count(Id), Business_Type__c from Account group by Business_Type__c]){
	system.debug(ar.get('expr0'));		//get the value of count(id)
	system.debug(ar.get('Business_Type__c'));	//get the grouped by field value
}

However, things get a little bit tricky when you have a namespace in the Salesforce instance and you have custom field in the SOQL. The sample query will still work, but you will get an error saying “Invalid aggregate result field” when you are trying to retrive the value of custom field.

To overcome this, you can choose to:

Option 1

Prepend the custom field with a namespace, for instance,

system.debug(ar.get('namespace__Business_Type__c'));	//get the grouped by field value

Option 2

Use alias in the SOQL to represent a custom field in query result.

for(AggregateResult ar : [select count(Id), Business_Type__c businesstype from Account group by Business_Type__c]){
	...
	system.debug(ar.get('businesstype'));	//get the grouped by field value
}

Personally, I would prefer to use Option 2 as I don’t have to hard code the namespace in all the SOQL.

Salesforce: Edit data from list view

If you are looking for a way to edit your records in one view, you can consider using the Salesforce out of the box inline editing feature in list view.

Setting up:

To set this feature up, you will need to check the Enable Inline Editing checbox in User Interface. (Setup | Customise | User Interface)

This feature only allows you to edit one record at a time. If you need to  edit multiple records at a time, you can try below method.

Mass Edit from Related List

To enable mass edit from list view, you can do so by enabling the permission in user profile. However, do note that multiple edit from list is NOT SUPPORTED in Product object. You can only do inline editing for Products.Mass edit in list view

Wedid: Boomi Atom Installation and Processes Transfer

Challenges

Customer has been using the Boomi Atom Cloud to run their integration processes and would like to shift to an on-premise atom to have better control over the atom configuration.

Customer would have difficulty transferring all the processes into the new production environment as well when the on-premise atom is available.

Solution:

  • Installed a 64-bit on-premise atom hosted in Linux server
  • Assisted in transferring existing processes into the new production environment
  • Updated the environment extension as well as redefine the integration schedule
Purpose Install on-premise atom and transfer the existing integration process to ensure all processes utilises the on-premise atom instead
Tool Boomi
Complexity Low

 

WEDID: FIELD AUTO COMPLETION

Challenges

This customer RTO business involves student information input to Salesforce and then export related Salesforce data for AVETMISS and HEIMS reporting. Subject information like subject field of education or student information like language should give the correct code as defined by Australia Bureau of Statistics and TGA rules for compliance purpose. Take some examples below:

  • Language : English
  • Code: 1201
  • Subject Field of Education: Electrical Engineering
  • Code: 031301
  • Subject Field of Education: Microbiology
  • Code: 010911

Solution:

Provided customer auto complete feature so that when user key in Language/Subject Field of Education, their code will be auto populated in their id field. This method will overcome Salesforce picklist limit as well. Javascript is used to create auto complete feature.

Related Objects Contact, custom objects
Components Javascript
Complexity Hard

WEDID: CENSUS DATE AUTOMATION FOR RTO USING SALESFORCE

Challenges:

This RTO needs automation for census date calculation in Salesforce instead of manual census date data population for each of the students. For instance, the census date data for students could be like this:

Student A

  • Course : Diploma of Business
  • #1 Census Date : 12th August 2015
  • Amount : $14,950
  • #2 Census Date : 28th November 2015
  • Amount: $14,950

Student B

Solution:

Census date is populated automatically after new student enrollment to a course. Census date automatically marked to ‘Accomplished’ when census date is reached. No manual work needed anymore for customer.

Related Objects Lead, person account, opportunity, custom objects
Components/App process builder, flow, formula
Complexity Medium

WEDID: TAX FILE NUMBER CHECK AGAINST PRESET ALGORITHM

Challenges

The customer RTO business involves collection of student’s Tax File Number (TFN) for HEIMS reporting. We need to provide customer a method to validate the TFN number provided by students:

  • The TFN given must be in 8 or 9 digits format
  •  The TFN must fulfill algorithm checks based on a document given by customer

Solution:

A trigger to check the TFN provided before the record is saved:

  • Use text instead of number so that ’0′ is not omitted when it is a leading digit.
  • Length check to ensure TFN provided is either 8 or 9 characters. Throw error when it is not.
  • Two version of checking against algorithm, one for 8 characters, one for 9 characters. Throw error if it doesn’t pass the checking.
Related Objects Contact
Components Apex Class, Apex Trigger
Complexity Easy

Wedid: Custom Invoice Administration

Challenges:

This company earns their revenues through bookings services that they have planned and executed for their clients.

Their invoicing practice is to invoice all completed line items of the bookings in end of each month. For an example,  they would like to prepare the bookings and line items completed this month for invoicing.

Booking A
1) Account: Company XYZ
2) Booking Completed: 01/16/2015
3) Booking Line Items:
- Placement Booking
- Transportation Booking

Booking B
1) Account: Company ABC
2) Booking Completed: 22/16/2015
3) Booking Line Items:
- Placement Booking
- Transportation Booking

Booking C
1) Account: Company XYZ
2) Booking Completed: 01/16/2015
3) Booking Line Items:
- Placement Booking
- Transportation Booking

Booking C
1) Account: Company ABC
2) Booking Completed: 22/16/2015
3) Booking Line Items:
- Placement Booking

Solution:

  1. The line items of each bookings are set as products in Salesforce. These products must be from a single pricebook.
  2. Build a Visualforce page that allows the record search and filtering. i.e. Dates.
  3. With the results found from the search and filtering, user can choose which bookings and their line items to be processed.
  4. Once proceed, a trigger will create opportunities for each bookings and booking line items will be created as opportunity line items against the created opportunities.
  5. User can then use an app to sync the opportunities and their opportunity line items over to their accounting  system for invoicing process.
Related Objects Product, Pricebook, Pricebook Entry, Booking, Booking line item, Opportunity, Opportunity Product
Components/App VisualForce, Trigger, Breadwinner App
Complexity Difficult

Boomi: SAP Integration Tips

This guide is not to help you to build a brilliant integration, but it gives you an important head start if you are integrating to SAP by using the Boomi SAP Connector.

Installation

  1. Before the installation, please make sure that you have installed the Java JDK (not JRE) in the server although Boomi Atom installer will download the Java JRE into the Atom installation directory (e.g, C:/Boomi Atomsphere/Atom – WDCi Atom/jre) if you do not have one in the server. Unfortunately, the Java JRE is not sufficient to run the SAP connector.
  2. You need to create a JAVA_HOME environment variable to point to the Java JDK directory and also include the JAVA_HOME/bin into the global path environment variable.
  3. After the installation, you will need to download the additional SAP library from the official site (service.sap.com/connectors > SAP Java Connector > Tools & Services) and extract the content into the <Boomi atom installation folder>/userlib/sapjco folder (e.g, C:/Boomi Atomsphere/Atom – WDCi Atom/userlib/sapjco).
  4. Once the above is done, please restart the Atom service in order for the changes to take effect.

Notes: If you would like to use SAP IDoc Listener (for real time integration), Boomi SAP connector requires a database (for tracking purpose) and you will need to download the required JDBC driver and place in the userlib/ folder.

Operation Profile

After importing the operation, please make sure that the date data type field has the correct date format in both Request and Response profile. The format used by the connector is:

  • Date = yyyy-MM-dd
  • Time = HH:mm:ss

Failing to configure the date in the Request profile would cause the connector to always returns all data from SAP.

Get Operation

Mostly, you will query the data by using last updated date time. The date/time format for the query operation is:

  • Date = yyyy-MM-dd (this is different from the format being used in SAP BAPI Tester, dd.MM.yyyy)
  • Time = HH:mm:ss

Send Operation

If you are sending information to SAP via a BAPI operation, it is best to double check with the SAP developer to see if they require Boomi SAP Connector to send “Commit Transaction” as part of the BAPI call. If yes, please make sure that the “Commit Transaction” option is checked in the SAP operation.

Salesforce Duplicate Management

Duplicate Management Overview:

Duplicate Management is a new Salesforce feature that helps you to maintain cleaner data by preventing Salesforce users from creating duplicated data. See Salesforce overview documentation.

Objects available for this feature:

  • Account
  • Contact
  • Lead
  • Custom Object

Key component of search logic:

  • Duplicate Rules – Define when a duplicate record can be save / created.
  • Matching Rules – Define what can be used to identify a duplicate record. ie: Email field.
  • Duplicate Record Sets – A list of duplicated records saved in a new Salesforce Object. This will work only if you have checked the ‘Report’ checkbox in defining the Duplicate Rules.
  • Duplicate Error Logs – This is to track any error during record matching.

For more information, see this documentation.

Behavior:

If you ever wonder why the duplicate error did not kick in when you have made changes to a duplicated record, the reason is probably because the changes made are not against the field(s) that is used in the duplicate check rule.

To test it out, you can try below:

  1. Created 2x lead records with the same email address
    • Lead 1 – test@example.com
    • Lead 2- test@example.com
  2. Create a duplicate matching rule (e.g, exact match) that listen on email address field in Lead object
  3. Enabled the rule on create and edit action

Result on Create:
Salesforce will display an error when a new lead created with email = test@example.com

Result on Edit:
Salesforce will skip the duplicate check when the existing Lead 1 was updated WITHOUT changing the email field information (which is currently duplicates of Lead 2). Error willonly prompt if a Lead email is changed from my@example.com to test@example.com.

To know more about this feature, please see https://help.salesforce.com/apex/HTViewHelpDoc?id=matching_rule_map_of_reference.htm&language=en_US.