This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%[ | |
| SET @MID = '50000XXXX' | |
| SET @apiCreds = LOOKUP('REST_Credentials', 'apiCreds', 'MID', @MID) | |
| SET @apiCreds = DecryptSymmetric(@apiCreds, 'aes', 'INT_PWD', @null, 'INT_SALT', @null, 'INT_IV', @null) | |
| ]%% | |
| <script runat="server"> | |
| Platform.Load("Core","1.1.1"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "startIndex": 0, | |
| "itemsPerPage": 25, | |
| "totalResults": 308, | |
| "entry": [ | |
| { | |
| "id": "dV9jX21YOHpNa0tzTGlYNXXXXXXXX", | |
| "key": "AUTOMATION KEY", | |
| "createdDate": "2020-01-16T14:53:53.177", | |
| "name": "AUTOMATION NAME", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script runat="server"> | |
| Platform.Load("Core","1.1.1"); | |
| /* The number of autoamtions we want to pull */ | |
| var automationsCount = 25; | |
| url = tenantURL + ".rest.marketingcloudapis.com/legacy/v1/beta/automations/automation/definition/?$top="+ automationsCount +"&$skip=0&$sort=lastRunTime%20desc"; | |
| var headerNames = ["Authorization"]; | |
| var headerValues = ["Bearer " + accessToken]; | |
| var automations, automationContent, automationDescription; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| automations = HTTP.Get(url, headerNames, headerValues); | |
| automationContent = Platform.Function.ParseJSON(Platform.Function.ParseJSON(Stringify(automations)).Content); | |
| // loop through all results | |
| if(automationContent.entry.length > 0 && automationContent.entry.length !== null) { | |
| for (i = 0; i < automationContent.entry.length; i++) { | |
| automationDescription = automationContent.entry[i].description; | |
| /* Getting schedule */ | |
| if(Platform.Function.ParseJSON(automationContent.entry[i].id) !== "" && Platform.Function.ParseJSON(automationContent.entry[i].id) !== null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "d057f44c-9333-4154-999c-XXXXXXXX", | |
| "name": "JB_DIXXXXX", | |
| "description": "", | |
| "key": "ea66db19-de12-41be-1dd4-940XXXXXX", | |
| "typeId": 1, | |
| "type": "scheduled", | |
| "statusId": 6, | |
| "status": "Scheduled", | |
| "categoryId": 486, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_striped slds-table_col-bordered slds-max-medium-table_stacked-horizontal slds-table_fixed-layout"> | |
| <thead> | |
| <tr class="slds-line-height_reset"> | |
| <th class="" scope="col"> | |
| <div class="slds-truncate" title="Automation Name">Automation Name</div> | |
| </th> | |
| <th class="" scope="col"> | |
| <div class="slds-truncate" title="Description">Description</div> | |
| </th> | |
| <th class="" scope="col"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Write('<tr class="slds-hint-parent"><th data-label="Automation Name" scope="row"><div class="slds-truncate" title='+automationContent.entry[i].name+'>'+ automationContent.entry[i].name +'</div></td>'); | |
| Write('<th data-label="Description" scope="row"><div class="slds-truncate" title="'+automationDescription+'" >'+ automationDescription +'</div></td>'); | |
| Write('<th data-label="Status" scope="row"><div class="slds-truncate" title="'+automationScheduleObject.schedule.scheduleStatus+'" >'+ automationScheduleObject.schedule.scheduleStatus +'</div></td>'); | |
| Write('<th data-label="Schedule Frequency" scope="row"><div class="slds-truncate" title="'+scheduleFrequencySplitted+'" >'+ scheduleFrequencySplitted +'</div></td>'); | |
| Write('<th data-label="Schedule Days" scope="row"><div class="slds-truncate" title="'+scheduleDays+'" >'+ scheduleDays +'</div></td>'); | |
| Write('<th data-label="Schedule Hours" scope="row"><div class="slds-truncate" title="'+hoursSchedule+'" >'+ hoursSchedule +'</div></td>'); | |
| Write('</tr>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%[ | |
| SET @MID = '50000XXXX' | |
| SET @apiCreds = LOOKUP('REST_Credentials', 'apiCreds', 'MID', @MID) | |
| SET @apiCreds = DecryptSymmetric(@apiCreds, 'aes', 'INT_PWD', @null, 'INT_SALT', @null, 'INT_IV', @null) | |
| ]%% | |
| <!doctype html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="https://cloud.actu.lamutuellegenerale.fr/salesforce-lightning-design-system.min.css" /> | |
| <style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Header Start --> | |
| <div class="slds-m-around_large"> | |
| <div class="slds-page-header"> | |
| <div class="slds-page-header__row"> | |
| <div class="slds-page-header__col-title"> | |
| <div class="slds-media"> | |
| <div class="slds-media__figure"> | |
| <span class="slds-icon_container slds-icon-standard-opportunity" title="opportunity"> | |
| <svg class="slds-icon slds-page-header__icon" aria-hidden="true"> | |
| <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#opportunity"></use> |