This file contains 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
using System; | |
using System.IO; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Host; | |
using Microsoft.Azure.WebJobs.Extensions.SendGrid; | |
using SendGrid.Helpers.Mail; | |
using PacodelaCruz.DurableFunctions.Models; | |
namespace PacodelaCruz.DurableFunctions.Approval | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.Azure.WebJobs.Host; |
This file contains 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
using System.IO; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Host; | |
using System; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using PacodelaCruz.DurableFunctions.Models; |
This file contains 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
{ | |
"requiresApproval": false, | |
"discount": 0.15 | |
} |
This file contains 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
{ | |
{% assign isDiscountEnabled = true %} | |
{% assign channelsWithDiscount = "Mobile" | Split: "|" %} | |
{% assign zoneOneCodes = "3000|3001|3002|3003|3004|3005|3006|3007|3008" | Split: "|" %} | |
{% assign zoneTwoCodes = "3205|3206|3207" | Split: "|" %} | |
{% assign minAmountForHigherDiscount = 50 %} | |
{% assign maxWeightForHigherDiscount = 10 %} | |
{% assign minAmountWithoutApproval = 10 %} | |
{% assign maxWeightWithoutApproval = 18 %} | |
This file contains 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
{ | |
{% assign zoneOneCodes = "3000|3001|3002|3003|3004|3005|3006|3007|3008" | Split: "|" %} | |
{% assign zoneTwoCodes = "3205|3206|3207" | Split: "|" %} | |
{%- if content.totalWeight > 18 or content.subtotal < 10 -%} | |
"requiresApproval": true, | |
{%- else -%} | |
"requiresApproval": false, | |
{%- endif -%} | |
This file contains 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
{ | |
"orderNumber": "1234", | |
"date": "2018-01-16", | |
"channel": "Mobile", | |
"customerId": "pacodelacruz", | |
"shipTo": { | |
"name": "Paco de la Cruz", | |
"street": "365 Around the Sun St", | |
"city": "Melbourne", | |
"state": "VIC", |
This file contains 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
let CustomerToFind = "{id}"; | |
AzureDiagnostics | |
| where Category == "WorkflowRuntime" | |
| where trackedProperties_IsBAMEvent_b == true | |
| where trackedProperties_CustomerId_s == CustomerToFind | |
| project OrderNumber = trackedProperties_OrderNumber_s, | |
OrderTotal = trackedProperties_OrderTotal_d, | |
OrderDate = trackedProperties_OrderDate_s, | |
Channel = trackedProperties_Channel_s, |
This file contains 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
AzureDiagnostics | |
| where Category == "WorkflowRuntime" | |
| where trackedProperties_IsBAMEvent_b == true | |
| project OrderNumber = trackedProperties_OrderNumber_s, | |
OrderTotal = trackedProperties_OrderTotal_d, | |
OrderDate = trackedProperties_OrderDate_s, | |
Channel = trackedProperties_Channel_s, | |
CustomerId = trackedProperties_CustomerId_s, | |
Workflow = resource_workflowName_s , | |
WorkflowRunId = resource_runId_s |
This file contains 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
AzureDiagnostics | |
| where Category == "WorkflowRuntime" | |
| where trackedProperties_IsBAMEvent_b == true | |
| summarize Amount = sum(trackedProperties_OrderTotal_d) by trackedProperties_OrderDate_s, trackedProperties_Channel_s | |
| order by trackedProperties_OrderDate_s asc |