Skip to main content

Hi All, 

I'm currently working on a Proof of Concept (POC) for the Data Consumption Framework, but I've encountered a roadblock. It seems I might be missing a step or making an error in the process. Here's a summary of the steps I've taken:

 

Created an Integration Definition (both APEX Defined and External Service Defined).

Skipped the MuleSoft Connect option as we are utilizing other External Services for data retrieval.

As per the documentation, the next step involves passing the Integration Definition to the Integration Procedure. Upon execution, it should return the desired results. However, I'm unclear on certain aspects, especially when creating an APEX-defined integration—specifically, where to set the endpoints and authentication.

 

Any assistance or guidance on this matter would be greatly appreciated.

 

Thank you in advance for your support.

 

Best regards,

 

#Trailhead  #Automation  #Integration 

1 Antwort
  1. 29. Aug., 05:54

    Short answer: For an APEX-defined Integration, the endpoint and authentication are not set inside the Integration Definition record itself — they're set inside your Apex.class that implements the DataSource.Load (or VlocityOpenInterface) interface. Inside that class's load() method, you build an HttpRequest and set the endpoint URL there, and for auth, best practice is to use a Named Credential (endpoint = callout:YourNamedCredential/path), so Salesforce handles the token/credentials instead of hardcoding them in code. 

    In the Integration Definition, you only specify: 

    • Type = "Apex Class"
    • The name of the class implementing the interface
    • The request/response JSON structure (so the Integration Procedure knows how to map the data)

     

    Then in the Integration Procedure, you just drop in an "Integration Action" element pointing to that Integration Definition — it calls your Apex class, which handles the endpoint and auth internally. 

      

    If you're using External Service Defined instead, the endpoint/auth is already configured via Named Credential when you set up the External Service itself (Setup > External Services) — no extra Apex needed in that case. 

      

    Bottom line: endpoint/auth lives in the Apex class (or Named Credential), not in the Integration Definition record.

0/9000