Wednesday, July 24, 2019

#723 OIC - Salesforce Adapter - Invoking APEX web services

APEX - a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on Salesforce servers in conjunction with calls to the API. Using syntax that looks like Java and acts like database stored procedures, Apex enables developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages. Apex code can be initiated by Web service requests and from triggers on objects.

Full SFDC docs here

So APEX is value-add I can create in my SFDC environment - here is a simple example -

I have created the APEX class - NiallCEmailManager and have tested it.

I now need to amend the code to expose it as a web service -

I now check for the APEX class in SFDC - Setup

I can now generate the WSDL -

and  save locally -

Create the Integration in OIC

The integration has a REST trigger.
Request contains a valid email address.

SFDC Connection configured as follows -

Mapping -

I have hard-coded subjects and messages.

addresses is set to Source email

I activate and test via Postman

No comments: