Propel
Creating a connected app
Click on the gear icon the top right and click on Setup
2. Open Apps > external client apps > settings from the left drawer
3. Enable creation of connected apps if not already enabled
4. Set the connected app name and api name to “Bild” and the contact email of your choice
5. Callback url → https://pdm.getbild.com/integration
6. Select the following settings and click on save
7. Click on manage consumer details and verify your email
8. Save the consumer key and consumer secret displayed
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
4. Create a field with
DataType = URL
Field label= ThumbnailURL (With exact casing)
Keep the rest of the options as default and create the field
5. 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
6. After the item is created in Fields & Relationship navigate to the “Thubnail” field you created and copy the field name. In this case it is ThumbnailURL__c
7. Go to FieldsSet and click on Item Details tab
8. Search for the Thumbnail field you cerated and drag it into In the field set
Apex class
In setup go to Custom code > Apex class
Click on new above the table
3. Paste the following code and click on save
public class ChangeWebhookInvoker {
public class ChangeWebhookInvoker { public class ChangeData { @InvocableVariable public Id changeID; @InvocableVariable public String companyID; } @InvocableMethod public static void sendWebhook(List<ChangeData> inputList) { for (ChangeData input : inputList) { sendCalloutFuture(input.changeID, input.companyID); } } @future(callout=true) public static void sendCalloutFuture(Id changeID, String companyID) { HttpRequest req = new HttpRequest(); req.setEndpoint('<https://y5uqvjxt7i.execute-api.us-west-2.amazonaws.com/propel/release>'); req.setMethod('POST'); req.setHeader('Content-Type', 'application/json'); 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()); } } }
4. In setup go to Security > Remote Site Settings and click on New Remote Site
5. Fill the following details and click Save Remote Site Name = BildWebhook Remote Site URL = https://y5uqvjxt7i.execute-api.us-west-2.amazonaws.com Disabel PRotocol Security= Yes Active=Yes
Webhook
In setup go to Process automation > Flows and click New Flow
2. Select Triggered and then Record-Triggered Flow
3. Chose the following options for the trigger
4. Click on the Plus Icon below Run Asynchronously
5. Click on Action and then click on All Actions
6. Search and Select ChangeWebhookInvoker
7. Set the label to Change Released
8. Include both changeID and comanyID
9. For changeID select Triggering PDLM__Change__C → Record ID
10. For companyID click on New Resource and enterthe following details
Resource type: Constant
API Name: companyID
Data Type: Text
Value: To be provided by Bild
11. Click on Save and set the FLow Label to “Change Release Flow”
12. Click on Activate in the top right corner
Bild
Integration Setup
Go to settings in bild in the top right corner and select Integraitons 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