Learning Objective:
After completing this unit, you’ll be able to:
- Describe custom apex class.
- Comfortably use the apex class to implement the custom processing integration.
Introduction
We can implement custom inbound processing with apex by two ways.
what is Custom Processing Apex Class with old way?
We always response to give back the message type structure which contain the Salesforce Id and SKYVVA message Id. Customer need to write the complete code for all processing steps
Basic Processing Steps:
Advantage
We can the fields as we have structured data.
Disadvantage
Customer need to write the complete code for all processing all steps.
How to implement custom inbound processing with apex class:
To extend some functions of integrate inbound processing extends skyvvasolutions.IProcessCustomAbs and implements skyvvasolutions.GisOdbgIntegration.IProcess
Methods are order process integration of custom processing and could be overridden if required
- void init(String interfaceId) – Select interface based on interfaceId, It can be optional.
- void doMap(skyvvasolutions.IServicesUtil.IMessageResult iResult) – Manage apex mapping data available in iResult which order list of skvva messages and list Map<String,String> data and handling logic could be applied here.
- List<skyvvasolutions.IServicesUtil.UpsertResult2> upsert2() – DML operation, upert business record and update status of message based on result of upsert business record (ie. Upsert Account).
follow the given steps to use apex class:
Step1: Create apex class
- Go to set up
- Search for apex class in quick search box
- Click on new button
The bellow is example of custom processing inbound and some methods should be overridden:
- global override void init(String interfaceId)
- global override void doMap(skyvvasolutions.IServicesUtil.IMessageResult iResult)
- global override List<skyvvasolutions.IServicesUtil.UpsertResult2> upsert2()
Example1:
Step 2: Create Integration
Step3 : Create Interface
- Go to integration
- select interface tab and click on new Interface button.
- Scroll down the page to Runtime Configuration- general section.
- Check custom processing flag
- Select custom processing class. Here class is SKYVva_CustomIntegration
Step4 : Do mapping.
- Click on Open mapping button.
- Map the field which we add in class.
Step5: upload data manually
- go to integration detail page.
- click on manual load link
- upload file.
Step7: Check result on message board
You can not see related to link here to check detail as this interface is used custom processing.
Step8 ; Check uploaded record and its details on dev console.
- Go to setup
- Go to dev console
- Apply query on contact object