You are here:
Create an Integration Definition for Product Images
Before you use the Convert Product Image to Base64 flow, create and compile the Apex provider class, then create the integration definition. The action resolves the named credential by matching its configured URL with Display URL.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package. |
| User Permissions Needed | |
|---|---|
| To create an integration definition for product images: | Life Sciences Commercial Admin |
-
Create the Apex provider class.
- From Setup, in the Quick Find box, enter Apex Classes, and then select Apex Classes.
- Click New.
- Paste the sample ImageToBase64ConversionService Apex code, and then click Save. See Sample Code to Create an Apex Provider Class.
- Confirm that the class saves and compiles successfully.
After you create and compile the Apex provider class,
ImageToBase64ConversionServiceappears in the Apex / Provider Class dropdown when you create an integration definition. -
Create an integration definition.
- From Setup, in the Quick Find box, find and select Integration Definitions.
- Click New.
- For Developer Name, enter ImageToBase64ConversionID.
- For Label, enter Image To Base64 Conversion.
- Select Active.
- For Type, select Apex.
- For Apex / Provider Class, select ImageToBase64ConversionService.
- Save your changes.
- Sample Code to Create an Apex Provider Class
Here is a sample code to create the Apex provider class for converting a product image to Base64.
Did this article solve your issue?
Let us know so we can improve!
