Please noteThis article assumes you have read Using program extensions.
|Creating a profile|
|Configuring your custom extension|
Custom extension providers can be used in programs to extend the functionality of the application's automation capability. This will allow you to make custom HTTP requests to endpoints of your choosing, unlocking the ability to integrate with almost any RESTful API that supports basic authentication or no authentication.
You'll need to supply our account team with the base URL, authentication methods and the name you wish to give your custom extension provider. They'll notify you when this has been done.
You'll then need to create a profile for it, at which point you'll be ready to use your provider within the program builder.
It will appear under 'Extensions' in the side panel to the left of the program canvas.
You can create a Salesforce profile in the 'Extension profiles' tab in the 'Access' area, which is accessed by selecting Access from the settings menu.
Click on Add to produce the provider type dropdown, select your new custom provider from the list and then click OK.
Add details/authentication for the new profile.
Enter the name for the profile, and select the authentication type it uses. If it uses basic authentication, you'll be required to enter the username and password.
You can also tick a box to limit the rate that requests are made by the profile, as some providers won't allow too many requests to be sent at once by the same profile.
Once done, click Save.
Once you've dragged and dropped your custom extension into your program, you'll need to configure it.
Click on the node and the configuration panel will slide in from the right.
Select the profile you wish to use for this action from the 'Profile' dropdown (or you can click the + to add another profile) and supply any additions to the URL, for example, paths like '/contact'. These can contain personalisation by clicking on the personalisation icon on the far right, allowing for '/contact/@EMAIL@', or, alternatively, URL parameters such as '/contact.php?email=@EMAIL@'.
Set the appropriate method of the HTTP request that will be made, and its content-type.
Click on Enter headers to open the 'Custom http headers' side panel, add the relevant headers and click Apply once done.
Click on Enter body data to open the 'Body data' side panel and add the relevant information to complete the request. Personalisation may again be used here as required. Click Apply once done.
Remember: it's always your responsibility to ensure you're supplying good, executable data, or your extension call could fail.
You have the option to enter some node text, which is useful for identifying what action or purpose the custom extension node is serving. The text entered will display within the node on the program canvas.
Once a program is activated and a contact reaches this node in your program, the body data entered will be personalised with the contact's information and sent to the endpoint specified. The endpoint should then respond with an appropriate response code.
Once happy with your configuration, you should firstly test the custom extension to ensure it works as expected. Click on Find contact, choose a contact from your 'Test' address book and then click Submit to make a test request. The full response will be provided underneath, allowing you to see whether the extension is working or not.
After testing successfully, click Apply.