Propel
Creating an external client app
Click on the gear icon the top right and click on Setup
Open Apps > external client apps > external client app manager from the left drawer
Click on “New External client app” in the top right.
Enter a name for the app and a contact email
Enable Oauth
Callback url →
Select the following options as the scope of the app
Select the following options and click on create
In the settings tab of the created External client app click on consumer. key and secret
Thumbnail field
In setup go to Object and FIeld → Object Manager
Click on Item Revision (PDLM__Item_Revision__c)
Go to Field & Relationships and click on New
Create a field with
DataType = URL
Field label= ThumbnailURL (With exact casing)
Keep the rest of the options as default and create the field
Create another field with
DataType=Formula
Field label=Thumbnail
Return type = Text
Simple Formula=
if(ISBLANK(ThumbnailURL__c),'No thumbnail uploaded',IMAGE(ThumbnailURL__c,'thumb'))Keep the rest of the options as default and create the item
After the item is created in Fields & Relationship navigate to the “Thumbnail” field you created and copy the field name. In this case it is
ThumbnailURL__cGo to FieldsSet and click on Item Details tab
Search for the Thumbnail field you created and drag it into In the field set
Apex class
In setup go to Custom code > Apex class
Click on new above the table
Paste the following code and click on save
public class ChangeWebhookInvokerWithAuth {
public class ChangeData {
@InvocableVariable
public Id changeID;
@InvocableVariable
public String companyID;
@InvocableVariable
public String endpoint;
@InvocableVariable
public String authToken;
}
@InvocableMethod
public static void sendWebhook(List<ChangeData> inputList) {
for (ChangeData input : inputList) {
sendCalloutFuture(
input.changeID,
input.companyID,
input.endpoint,
input.authToken
);
}
}
@future(callout=true)
public static void sendCalloutFuture(
Id changeID,
String companyID,
String endpoint,
String authToken
) {
HttpRequest req = new HttpRequest();
req.setEndpoint(endpoint);
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setHeader('Authorization', 'Bearer ' + authToken);
Map<String, Object> payload = new Map<String, Object>{
'changeID' => changeID,
'companyID' => companyID
};
req.setBody(JSON.serialize(payload));
Http http = new Http();
try {
HttpResponse res = http.send(req);
System.debug('Webhook sent: ' + res.getBody());
} catch (Exception e) {
System.debug('Webhook error: ' + e.getMessage());
}
}
}In setup go to Security > Remote Site Settings and click on New Remote Site
Fill the following details and click Save
Remote Site Name = BildWebhook
Remote Site URL =
Disable Protocol Security= Yes
Active=Yes
Webhook
In setup go to Process automation > Flows and click New Flow
Select Triggered and then Record-Triggered Flow
Chose the following options for the trigger. Choose the object, condition requirement, field, operator and values as shown in the below image
Make sure you enable the toggle of Add Asynchronous Path
Click on the Plus Icon below Run Asynchronously
Click on Action and then click on All Actions
Search and Select ChangeWebhookInvokerWithAuth
Set the label to Change Released
Include changeID, companyID, endpoint and authToken
For changeID select Triggering PDLM__Change__C → Record ID and for other fields follow the next case
Get all the values of the following fields
companyID: value will be provided by Bild
endpoint: value(ending with /propel/release) will be:
authToken: Follow the auth token generation steps below in Bild to generate the auth token
For companyID/endpoint/authToken click on the field and select New Resource
Choose Resource Type as Constant.
Type API Name as companyID or BildToken or endpoint (all three individually)
Select Data Type as TextPaste the corresponding value you got from the previous step in the input section.
Click on Done and your final screen should looks like this
Click on Save and set the Flow Label to “Change Release Flow”
Click on Activate in the top right corner
Propel - Enabling Client credentials flow
Click on the gear icon the top right and click on Setup
Open Apps > External client apps > External client app manager from the left drawer
Click on the Bild Integration
Click on Edit and Expand OAuth Policies
Enable the client credentials flow and enter the username of the System Administrator
Bild
Integration Setup
Go to settings in Bild in the top right corner and select Integrations from the left panel
Click on Propel card, and confirm to dialog box, you’d be redirected to a new view.
Enter the consumer key, and the consumer secret from the connected app created
Enter you salesforce URL. It should be in the format https://propelbildintegration.my.salesforce.com
Click on setup integration
Click on fetch categories. This will redirect you to salesforce. Login and click on allow if prompted. Click on fetch categories again.
Enter the Thumbnail Field name you copied after creating the Thumbnail Field
Chose what files you want to push to Propel
Navigate to Integration settings
Enable “Use Administrator to update files” and click on Save




























