{
	"info": {
		"_postman_id": "82e1419c-41ca-4ab9-961b-c1175e393cc8",
		"name": "PowerAutomate: SpokePhone-Dynamics365-webhooks",
		"description": "Simulates exaple spokephone webhooks to send to powerautomate to test flows.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "call_contact_assigned_with_add Test Sampler",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "23b38cd9-693b-4124-9cea-7ef996c2cb46",
						"exec": [
							"// For testing: Create a random GUID to test when a call ID or contact ID is not found.\r",
							"var uuid = require('uuid');\r",
							"var myUUID = uuid.v4();\r",
							"\r",
							"// Set to an existing callId to test the flow being triggered on an already added call - you can manually create a call log in dynamics and grab the id.\r",
							"pm.collectionVariables.set(\"callid\",myUUID);"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"id\": \"8e4964b0-279f-11eb-9cb0-a5eda60a8f31\",\r\n  \"timestamp\": 1605485180539,\r\n  \"created\": \"2020-11-16T00:06:20.539Z\",\r\n  \"type\": \"call.contact_assigned_with_add\",\r\n  \"version\": \"2020-07-15\",\r\n  \"data\": {\r\n    \"call\": {\r\n      \"id\": \"{{callid}}\",\r\n      \"status\": \"accepted\",\r\n      \"direction\": \"inbound\",\r\n      \"isInternal\": false,\r\n      \"lastModifiedAt\": \"2020-11-16T00:06:18.809Z\",\r\n      \"lastModifiedTimestamp\": 1605485178809,\r\n      \"startedAt\": \"2020-11-16T00:04:53.358Z\",\r\n      \"startedTimestamp\": 1605485093358,\r\n      \"answeredAt\": \"2020-11-16T00:05:10.001Z\",\r\n      \"initiator\": \"+64205551112\",\r\n      \"recipient\": \"+61288882222\",\r\n      \"contactNumber\": \"+64205551112\",\r\n      \"companyNumber\": \"+64215559999\",\r\n      \"duration\": 19124,\r\n      \"user\": {\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"mobile\": \"+64215558888\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"assignedUser\": {\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"mobile\": \"+64215558888\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"assignedContact\": {\r\n        \"emails\": [\r\n          {\r\n            \"email\": \"testcaller2@email.com\"\r\n          }\r\n        ],\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Caller2\",\r\n        \"phoneNumbers\": [\r\n          {\r\n            \"numberRaw\": \"+64205551112\",\r\n            \"numberE164\": \"+64205551112\",\r\n            \"numberDisplay\": \"+64 20 555 1112\"\r\n          }\r\n        ]\r\n      },\r\n      \"recordings\": [],\r\n      \"highlights\": [],\r\n      \"summary\": {\r\n        \"header\": \"Inbound call from Test Caller2 to +64215559999\",\r\n        \"contactNumberDescription\": \"Called in from +64205551112\",\r\n        \"companyNumberDescription\": \"Called in to +64215559999\"\r\n      },\r\n      \"forms\": []\r\n    }\r\n  }\r\n}"
				},
				"url": {
					"raw": "https://prod-14.australiasoutheast.logic.azure.com:443/workflows/221b7806f5204cf4b9fb79a208d4506b/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=WHDGWDffLLZvk0QD-lsgW_jT46hJbgdEHQ1mR4yZ7Gw",
					"protocol": "https",
					"host": [
						"prod-14",
						"australiasoutheast",
						"logic",
						"azure",
						"com"
					],
					"port": "443",
					"path": [
						"workflows",
						"221b7806f5204cf4b9fb79a208d4506b",
						"triggers",
						"manual",
						"paths",
						"invoke"
					],
					"query": [
						{
							"key": "api-version",
							"value": "2016-06-01"
						},
						{
							"key": "sp",
							"value": "%2Ftriggers%2Fmanual%2Frun"
						},
						{
							"key": "sv",
							"value": "1.0"
						},
						{
							"key": "sig",
							"value": "WHDGWDffLLZvk0QD-lsgW_jT46hJbgdEHQ1mR4yZ7Gw"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "call_contact_assigned_with_update Test Sampler",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "10d921a1-b847-435f-b5ba-fdbc46a166fd",
						"exec": [
							"// For testing: Create a random GUID to test when a call ID or contact ID is not found.\r",
							"var uuid = require('uuid');\r",
							"var myUUID = uuid.v4();\r",
							"\r",
							"// Setup a random call ID.  The call id in 'call-contact-assigned-with-add' event will always be unknown to the crm.\r",
							"pm.collectionVariables.set(\"callid\",myUUID);\r",
							"\r",
							"// Set the appropriate existing contactID to update here:\r",
							"pm.collectionVariables.set(\"contactid\",\"2f0c8308-b12e-eb11-a813-000d3a79a22c\");\r",
							""
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"id\": \"a1eaf870-27a5-11eb-acb7-93393f87766b\",\r\n  \"timestamp\": 1605487790455,\r\n  \"created\": \"2020-11-16T00:49:50.455Z\",\r\n  \"type\": \"call.contact_assigned_with_update\",\r\n  \"version\": \"2020-07-15\",\r\n  \"data\": {\r\n    \"call\": {\r\n      \"summary\": {\r\n        \"header\": \"Inbound call from Test Caller2 to +64215559999\",\r\n        \"companyNumberDescription\": \"Called in to 64215559999\",\r\n        \"contactNumberDescription\": \"Called in from 64205551112\",\r\n        \"outcome\": \"Answered by Test Spokeuser. Spoke for a minute\"\r\n      },\r\n      \"durationText\": \"a minute\",\r\n      \"lastModifiedAt\": \"2020-11-16T00:49:50.167Z\",\r\n      \"answeredAt\": \"2020-11-16T00:48:52.001Z\",\r\n      \"initiator\": \"+64205551112\",\r\n      \"assignedContact\": {\r\n        \"id\": \"{{contactid}}\",\r\n        \"phonebookId\": \"ce4f71b0-2797-11eb-943b-891eebcdc14d\",\r\n        \"phonebookName\": \"Dynamics 365\",\r\n        \"companyName\": null,\r\n        \"emails\": [\r\n          {\r\n            \"email\": \"testcaller2@email.com\",\r\n            \"label\": \"primary\"\r\n          }\r\n        ],\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Caller2\",\r\n        \"phoneNumbers\": [\r\n          {\r\n            \"label\": \"mobile\",\r\n            \"numberRaw\": \"64205551112\",\r\n            \"numberE164\": \"+64205551112\",\r\n            \"numberDisplay\": \"+64 20 555 1112\"\r\n          },\r\n          {\r\n            \"numberRaw\": \"+64205550002\",\r\n            \"numberE164\": \"+64205550002\",\r\n            \"numberDisplay\": \"+64 20 555 0002\"\r\n          }\r\n        ],\r\n        \"jobTitle\": null\r\n      },\r\n      \"startedAt\": \"2020-11-16T00:48:39.045Z\",\r\n      \"lastModifiedTimestamp\": 1605487790167,\r\n      \"startedTimestamp\": 1605487719045,\r\n      \"isInternal\": false,\r\n      \"duration\": 47382,\r\n      \"highlights\": [],\r\n      \"companyNumber\": \"+64215559999\",\r\n      \"recordings\": [\r\n        {\r\n          \"duration\": 32,\r\n          \"startedAt\": \"2020-11-16T00:48:53.000Z\"\r\n        }\r\n      ],\r\n      \"endedAt\": \"2020-11-16T00:49:26.427Z\",\r\n      \"recipient\": \"+64215559999\",\r\n      \"contactNumber\": \"+64205551112\",\r\n      \"id\": \"{{callid}}\",\r\n      \"user\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"assignedUser\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"forms\": [],\r\n      \"status\": \"accepted\",\r\n      \"direction\": \"inbound\"\r\n    }\r\n  }\r\n}"
				},
				"url": {
					"raw": "https://prod-14.australiasoutheast.logic.azure.com:443/workflows/221b7806f5204cf4b9fb79a208d4506b/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=WHDGWDffLLZvk0QD-lsgW_jT46hJbgdEHQ1mR4yZ7Gw",
					"protocol": "https",
					"host": [
						"prod-14",
						"australiasoutheast",
						"logic",
						"azure",
						"com"
					],
					"port": "443",
					"path": [
						"workflows",
						"221b7806f5204cf4b9fb79a208d4506b",
						"triggers",
						"manual",
						"paths",
						"invoke"
					],
					"query": [
						{
							"key": "api-version",
							"value": "2016-06-01"
						},
						{
							"key": "sp",
							"value": "%2Ftriggers%2Fmanual%2Frun"
						},
						{
							"key": "sv",
							"value": "1.0"
						},
						{
							"key": "sig",
							"value": "WHDGWDffLLZvk0QD-lsgW_jT46hJbgdEHQ1mR4yZ7Gw"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "call_ended Test Sampler",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "f4503019-420b-4d9c-9a80-1341395086f8",
						"exec": [
							"// For testing: Create a random GUID to test when a call ID or contact ID is not found.\r",
							"var uuid = require('uuid');\r",
							"var myUUID = uuid.v4();\r",
							"\r",
							"// Set to a contactid that exists in Dynamics.\r",
							"pm.collectionVariables.set(\"contactid\",\"2f0c8308-b12e-eb11-a813-000d3a79a22c\");\r",
							"\r",
							"// Set a random call ID to create a new call, set this to an existing call id to test already exists handler.\r",
							"pm.collectionVariables.set(\"callid\",myUUID);\r",
							"//pm.collectionVariables.set(\"callid\",\"7764bd70-27a5-11eb-9bc5-f393a007bd3b\");"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"type": "text",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"id\": \"5ea997b0-23a9-11eb-8fcc-7f281a46c28a\",\r\n  \"timestamp\": 1605049590955,\r\n  \"created\": \"2020-11-10T23:06:30.955Z\",\r\n  \"type\": \"call.form.submitted\",\r\n  \"version\": \"2020-07-15\",\r\n  \"data\": {\r\n    \"call\": {\r\n      \"summary\": {\r\n        \"header\": \"Inbound call from Test Caller1 to +64215559999\",\r\n        \"companyNumberDescription\": \"Called in to 64215559999\",\r\n        \"contactNumberDescription\": \"Called in from 64205551111\",\r\n        \"outcome\": \"Answered by Test Spokeuser. Spoke for a minute\"\r\n      },\r\n      \"durationText\": \"a minute\",\r\n      \"lastModifiedAt\": \"2020-11-16T00:49:50.167Z\",\r\n      \"answeredAt\": \"2020-11-16T00:48:52.001Z\",\r\n      \"initiator\": \"+64205551111\",\r\n      \"assignedContact\": {\r\n        \"id\": \"{{contactid}}\",\r\n        \"phonebookId\": \"ce4f71b0-2797-11eb-943b-891eebcdc14d\",\r\n        \"phonebookName\": \"Dynamics 365\",\r\n        \"companyName\": null,\r\n        \"emails\": [\r\n          {\r\n            \"email\": \"testcaller1@email.com\",\r\n            \"label\": \"primary\"\r\n          }\r\n        ],\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Caller1\",\r\n        \"phoneNumbers\": [\r\n          {\r\n            \"label\": \"mobile\",\r\n            \"numberRaw\": \"64205551111\",\r\n            \"numberE164\": \"+64205551111\",\r\n            \"numberDisplay\": \"+64 20 555 1111\"\r\n          },\r\n          {\r\n            \"label\": \"business\",\r\n            \"numberRaw\": \"+64205550000\",\r\n            \"numberE164\": \"+64205550000\",\r\n            \"numberDisplay\": \"+64 20 555 0000\"\r\n          }\r\n        ],\r\n        \"jobTitle\": null\r\n      },\r\n      \"startedAt\": \"2020-11-16T00:48:39.045Z\",\r\n      \"lastModifiedTimestamp\": 1605487790167,\r\n      \"startedTimestamp\": 1605487719045,\r\n      \"isInternal\": false,\r\n      \"duration\": 47382,\r\n      \"highlights\": [],\r\n      \"companyNumber\": \"+64215559999\",\r\n      \"recordings\": [\r\n        {\r\n          \"duration\": 32,\r\n          \"startedAt\": \"2020-11-16T00:48:53.000Z\"\r\n        }\r\n      ],\r\n      \"endedAt\": \"2020-11-16T00:49:26.427Z\",\r\n      \"recipient\": \"+64215559999\",\r\n      \"contactNumber\": \"+64205551111\",\r\n      \"id\": \"{{callid}}\",\r\n      \"user\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"assignedUser\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"forms\": [],\r\n      \"status\": \"ended\",\r\n      \"direction\": \"outbound\"\r\n    }\r\n  }\r\n}",
					"options": {
						"raw": {}
					}
				},
				"url": {
					"raw": "https://prod-30.australiasoutheast.logic.azure.com:443/workflows/cde9500154944c9bbaccaeb6b018717f/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=pHbfPYJ8Ki43jSO4wCiAU6vP7ml-Xj6y9l_6jBxvq3w",
					"protocol": "https",
					"host": [
						"prod-30",
						"australiasoutheast",
						"logic",
						"azure",
						"com"
					],
					"port": "443",
					"path": [
						"workflows",
						"cde9500154944c9bbaccaeb6b018717f",
						"triggers",
						"manual",
						"paths",
						"invoke"
					],
					"query": [
						{
							"key": "api-version",
							"value": "2016-06-01"
						},
						{
							"key": "sp",
							"value": "%2Ftriggers%2Fmanual%2Frun"
						},
						{
							"key": "sv",
							"value": "1.0"
						},
						{
							"key": "sig",
							"value": "pHbfPYJ8Ki43jSO4wCiAU6vP7ml-Xj6y9l_6jBxvq3w"
						}
					]
				},
				"description": "Spoke webhook event \r\nCall log, contact assigned with add"
			},
			"response": []
		},
		{
			"name": "call_note_added Test Sampler",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "a4c69b21-8447-4037-bff9-c7923779473b",
						"exec": [
							"// For testing: Create a random GUID to test when a call ID or contact ID is not found.\r",
							"var uuid = require('uuid');\r",
							"var myUUID = uuid.v4();\r",
							"\r",
							"// Set to a contactid that exists in Dynamics.\r",
							"//pm.collectionVariables.set(\"contactid\",myUUID);\r",
							"pm.collectionVariables.set(\"contactid\",\"2f0c8308-b12e-eb11-a813-000d3a79a22c\");\r",
							"\r",
							"// Set a random call ID to create a new call, set this to an existing call id to test already exists handler.\r",
							"//pm.collectionVariables.set(\"callid\",myUUID);\r",
							"pm.collectionVariables.set(\"callid\",\"00515f3d-3d56-4c20-9234-c6f894a7e9b7\");"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"type": "text",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"id\": \"a5272470-2df7-11eb-85c1-9180d35c2170\",\r\n  \"timestamp\": 1606182721591,\r\n  \"created\": \"2020-11-24T01:52:01.591Z\",\r\n  \"type\": \"call.note.created\",\r\n  \"version\": \"2020-07-15\",\r\n  \"data\": {\r\n    \"call\": {\r\n      \"summary\": {\r\n        \"header\": \"Inbound call from Test Caller1 to +64215559999\",\r\n        \"companyNumberDescription\": \"Called in to 64215559999\",\r\n        \"contactNumberDescription\": \"Called in from 64205551111\",\r\n        \"outcome\": \"Answered by Test Spokeuser. Spoke for a minute\"\r\n      },\r\n      \"durationText\": \"a minute\",\r\n      \"lastModifiedAt\": \"2020-11-16T00:49:50.167Z\",\r\n      \"answeredAt\": \"2020-11-16T00:48:52.001Z\",\r\n      \"initiator\": \"+64205551111\",\r\n      \"assignedContact\": {\r\n        \"id\": \"{{contactid}}\",\r\n        \"phonebookId\": \"ce4f71b0-2797-11eb-943b-891eebcdc14d\",\r\n        \"phonebookName\": \"Dynamics 365\",\r\n        \"companyName\": null,\r\n        \"emails\": [\r\n          {\r\n            \"email\": \"testcaller1@email.com\",\r\n            \"label\": \"primary\"\r\n          }\r\n        ],\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Caller1\",\r\n        \"phoneNumbers\": [\r\n          {\r\n            \"label\": \"mobile\",\r\n            \"numberRaw\": \"64205551111\",\r\n            \"numberE164\": \"+64205551111\",\r\n            \"numberDisplay\": \"+64 20 555 1111\"\r\n          },\r\n          {\r\n            \"label\": \"business\",\r\n            \"numberRaw\": \"+64205550000\",\r\n            \"numberE164\": \"+64205550000\",\r\n            \"numberDisplay\": \"+64 20 555 0000\"\r\n          }\r\n        ],\r\n        \"jobTitle\": null\r\n      },\r\n      \"startedAt\": \"2020-11-16T00:48:39.045Z\",\r\n      \"lastModifiedTimestamp\": 1605487790167,\r\n      \"startedTimestamp\": 1605487719045,\r\n      \"isInternal\": false,\r\n      \"duration\": 47382,\r\n      \"highlights\": [],\r\n      \"companyNumber\": \"+64215559999\",\r\n      \"recordings\": [\r\n        {\r\n          \"duration\": 32,\r\n          \"startedAt\": \"2020-11-16T00:48:53.000Z\"\r\n        }\r\n      ],\r\n      \"endedAt\": \"2020-11-16T00:49:26.427Z\",\r\n      \"recipient\": \"+64215559999\",\r\n      \"contactNumber\": \"+64205551111\",\r\n      \"id\": \"{{callid}}\",\r\n      \"user\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"assignedUser\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n\t  \"notes\": [\r\n\t    {\r\n\t\t  \"id\": \"a4e58790-2df7-11eb-9240-39332f54585d\",\r\n\t\t  \"createdAt\": \"2020-11-24T01:51:49.000Z\",\r\n\t\t  \"createdTimestamp\": 1606182709000,\r\n\t\t  \"createdByUser\": {\r\n\t\t\t\"mobile\": \"+64215558888\",\r\n\t\t\t\"firstName\": \"Test\",\r\n\t\t\t\"lastName\": \"Spokeuser\",\r\n\t\t\t\"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n\t\t\t\"email\": \"testspokeuser@email.com\",\r\n\t\t\t\"jobTitle\": \"Owner\"\r\n\t\t  },\r\n\t\t  \"noteContents\": [\r\n\t\t\t{\r\n\t\t\t  \"content\": \"A test note from Postman with a lot of data indeed, in fact this may well be one of the longest notes ever submitted on the end of a call that was dictated into the voice note field.  The google dictation tool seems to have worked very well indeed considering the difficulty of the background noise on this call and the accent that the dictator was using at the time.\",\r\n\t\t\t  \"transcribedAt\": \"2020-11-24T01:51:49.000Z\",\r\n\t\t\t  \"transcribedTimestamp\": 1606182709000,\r\n\t\t\t  \"transcriptionConfidence\": 1\r\n\t\t\t}\r\n\t\t  ],\r\n\t\t  \"noteText\": \"A test note from Postman with a lot of data indeed, in fact this may well be one of the longest notes ever submitted on the end of a call that was dictated into the voice note field.  The google dictation tool seems to have worked very well indeed considering the difficulty of the background noise on this call and the accent that the dictator was using at the time.\"\r\n\t\t}\r\n\t  ],\r\n      \"forms\": [],\r\n      \"status\": \"ended\",\r\n      \"direction\": \"outbound\"\r\n    },\r\n    \"note\": {\r\n        \"id\": \"a4e58790-2df7-11eb-9240-39332f54585d\",\r\n        \"createdAt\": \"2020-11-24T01:51:49.000Z\",\r\n        \"createdTimestamp\": 1606182709000,\r\n        \"createdByUser\": {\r\n          \"mobile\": \"+64215558888\",\r\n          \"firstName\": \"Test\",\r\n          \"lastName\": \"Spokeuser\",\r\n          \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n          \"email\": \"testspokeuser@email.com\",\r\n          \"jobTitle\": \"Owner\"\r\n        },\r\n        \"noteContents\": [\r\n          {\r\n            \"content\": \"A test note from Postman with a lot of data indeed, in fact this may well be one of the longest notes ever submitted on the end of a call that was dictated into the voice note field.  The google dictation tool seems to have worked very well indeed considering the difficulty of the background noise on this call and the accent that the dictator was using at the time.\",\r\n            \"transcribedAt\": \"2020-11-24T01:51:49.000Z\",\r\n            \"transcribedTimestamp\": 1606182709000,\r\n            \"transcriptionConfidence\": 1\r\n          }\r\n        ],\r\n        \"noteText\": \"A test note from Postman with a lot of data indeed, in fact this may well be one of the longest notes ever submitted on the end of a call that was dictated into the voice note field.  The google dictation tool seems to have worked very well indeed considering the difficulty of the background noise on this call and the accent that the dictator was using at the time.\"\r\n    }\r\n  }\r\n}",
					"options": {
						"raw": {}
					}
				},
				"url": {
					"raw": "https://prod-30.australiasoutheast.logic.azure.com:443/workflows/6a6f5dec6f744e26a934b9ec6809e520/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=t7sw0RoNMO_imCIxljQMdsQQw1TZet5Udkbn1CKYvaw",
					"protocol": "https",
					"host": [
						"prod-30",
						"australiasoutheast",
						"logic",
						"azure",
						"com"
					],
					"port": "443",
					"path": [
						"workflows",
						"6a6f5dec6f744e26a934b9ec6809e520",
						"triggers",
						"manual",
						"paths",
						"invoke"
					],
					"query": [
						{
							"key": "api-version",
							"value": "2016-06-01"
						},
						{
							"key": "sp",
							"value": "%2Ftriggers%2Fmanual%2Frun"
						},
						{
							"key": "sv",
							"value": "1.0"
						},
						{
							"key": "sig",
							"value": "t7sw0RoNMO_imCIxljQMdsQQw1TZet5Udkbn1CKYvaw"
						}
					]
				},
				"description": "Spoke webhook event \r\nNote added"
			},
			"response": []
		},
		{
			"name": "form_submitted Test Sampler",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "28784dfc-34aa-485a-90ae-7756cd0abadd",
						"exec": [
							"// For testing: Create a random GUID to test when a call ID or contact ID is not found.\r",
							"var uuid = require('uuid');\r",
							"var myUUID = uuid.v4();\r",
							"\r",
							"// Set to an existing callId to add the form data to that call log - you can manually create a call log in dynamics and grab the id.\r",
							"pm.collectionVariables.set(\"callid\",\"7764bd70-27a5-11eb-9bc5-f393a007bd3b\");\r",
							"pm.collectionVariables.set(\"callid\",\"2764bd70-27a5-11eb-9bc5-f393a007bd3b\");\r",
							"pm.collectionVariables.set(\"callid\",myUUID);\r",
							"\r",
							"// Set to an existing contactId to add the form data to a new call log against that contact.  Assign random if testing no contact found.\r",
							"pm.collectionVariables.set(\"contactid\",\"ffd5da12-3334-eb11-a813-000d3a79a22c\");\r",
							"\r",
							"// Set the form reference.  The Power Automate script uses this to choose whether or not to process the form data.\r",
							"pm.collectionVariables.set(\"formRef\",\"QGate003\");\r",
							"// pm.collectionVariables.set(\"callid\",myUUID);"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"id\": \"832035e0-2890-11eb-acda-61218f734f12\",\r\n  \"timestamp\": 1605588670526,\r\n  \"created\": \"2020-11-17T04:51:10.526Z\",\r\n  \"type\": \"call.form.submitted\",\r\n  \"version\": \"2020-07-15\",\r\n  \"data\": {\r\n    \"call\": {\r\n      \"summary\": {\r\n        \"header\": \"Inbound call from Test Caller1 to +64215559999\",\r\n        \"companyNumberDescription\": \"Called in to 64215559999\",\r\n        \"contactNumberDescription\": \"Called in from 64205551111\",\r\n        \"outcome\": \"Answered by Test Spokeuser. Spoke for a minute\"\r\n      },\r\n      \"durationText\": \"a minute\",\r\n      \"lastModifiedAt\": \"2020-11-16T00:49:50.167Z\",\r\n      \"answeredAt\": \"2020-11-16T00:48:52.001Z\",\r\n      \"initiator\": \"+64205551111\",\r\n      \"assignedContact\": {\r\n        \"phonebookId\": \"484f18a0-278c-11eb-8906-6d7350e5ecd9\",\r\n        \"emails\": [\r\n          {\r\n            \"email\": \"testcaller1@email.com\",\r\n            \"label\": \"primary\"\r\n          }\r\n        ],\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Caller1\",\r\n        \"companyName\": null,\r\n        \"jobTitle\": null,\r\n        \"id\": \"{{contactid}}\",\r\n        \"phonebookName\": \"Dynamics 365\",\r\n        \"phoneNumbers\": [\r\n          {\r\n            \"label\": \"mobile\",\r\n            \"numberRaw\": \"64205551111\",\r\n            \"numberE164\": \"+64205551111\",\r\n            \"numberDisplay\": \"+64 20 555 1111\"\r\n          },\r\n          {\r\n            \"label\": \"business\",\r\n            \"numberRaw\": \"+64205550000\",\r\n            \"numberE164\": \"+64205550000\",\r\n            \"numberDisplay\": \"+64 20 555 0000\"\r\n          }\r\n        ]\r\n      },\r\n      \"startedAt\": \"2020-11-15T22:33:53.767Z\",\r\n      \"lastModifiedTimestamp\": 1605588670211,\r\n      \"startedTimestamp\": 1605479633767,\r\n      \"isInternal\": false,\r\n      \"duration\": 21369,\r\n      \"highlights\": [\r\n      ],\r\n      \"companyNumber\": \"+64215559999\",\r\n      \"recordings\": [\r\n        {\r\n          \"duration\": 6,\r\n          \"startedAt\": \"2020-11-15T22:34:08.000Z\"\r\n        }\r\n      ],\r\n      \"endedAt\": \"2020-11-15T22:34:15.136Z\",\r\n      \"recipient\": \"+61288809056\",\r\n      \"contactNumber\": \"+642040193349\",\r\n      \"id\": \"{{callid}}\",\r\n      \"user\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"assignedUser\": {\r\n        \"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"forms\": [\r\n        {\r\n          \"id\": \"abb82030-2534-11eb-a7bd-db61776e598f\",\r\n          \"user\": {\r\n            \"mobile\": \"+64215558888\",\r\n\t\t\t\"firstName\": \"Test\",\r\n\t\t\t\"lastName\": \"Spokeuser\",\r\n\t\t\t\"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n\t\t\t\"email\": \"testspokeuser@email.com\",\r\n\t\t\t\"jobTitle\": \"Owner\"\r\n          },\r\n          \"name\": \"Sample Form: Call Disposition\",\r\n          \"description\": \"A Spoke Phone sample for for call dispositions.\",\r\n          \"reference\": \"{{formRef}}\",\r\n          \"type\": \"conversation\",\r\n          \"status\": \"submitted\",\r\n          \"startedAt\": \"2020-11-17T04:50:52.941Z\",\r\n          \"startedTimestamp\": 1605588652941,\r\n          \"submittedAt\": \"2020-11-17T04:51:08.087Z\",\r\n          \"submittedTimestamp\": 1605588668087,\r\n          \"formData\": {\r\n            \"disposition\": {\r\n              \"callDisposition\": \"Complaint\",\r\n              \"Reason\": \"QA/QC\"\r\n            },\r\n            \"callNotes\": \"Some notes\"\r\n          }\r\n        }\r\n      ],\r\n      \"status\": \"accepted\",\r\n      \"direction\": \"inbound\"\r\n    },\r\n    \"form\": {\r\n      \"id\": \"abb82030-2534-11eb-a7bd-db61776e598f\",\r\n      \"user\": {\r\n\t\t\"mobile\": \"+64215558888\",\r\n        \"firstName\": \"Test\",\r\n        \"lastName\": \"Spokeuser\",\r\n        \"userId\": \"8fc6a160-18a2-11eb-a132-73a9d7efa317\",\r\n        \"email\": \"testspokeuser@email.com\",\r\n        \"jobTitle\": \"Owner\"\r\n      },\r\n      \"name\": \"Sample Form: Call Disposition\",\r\n      \"description\": \"A Spoke Phone sample for for call dispositions.\",\r\n      \"reference\": \"{{formRef}}\",\r\n      \"type\": \"conversation\",\r\n      \"status\": \"submitted\",\r\n      \"startedAt\": \"2020-11-17T04:50:52.941Z\",\r\n      \"startedTimestamp\": 1605588652941,\r\n      \"submittedAt\": \"2020-11-17T04:51:08.087Z\",\r\n      \"submittedTimestamp\": 1605588668087,\r\n\t  \"formData\": {\r\n\t\t\"disposition\": {\r\n\t\t  \"callDisposition\": \"Complaint\",\r\n\t\t  \"Reason\": \"QA/QC\"\r\n\t\t},\r\n\t\t\"callNotes\": \"Some notes\"\r\n\t  }\r\n    }\r\n  }\r\n}"
				},
				"url": {
					"raw": "https://prod-01.australiasoutheast.logic.azure.com:443/workflows/ea2f7dcddf3149f9b78d23c02ef650a0/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=S2rgd2KIxpl_jYmDLlgHoXDrWEqvORLAXyufvpRuT4I",
					"protocol": "https",
					"host": [
						"prod-01",
						"australiasoutheast",
						"logic",
						"azure",
						"com"
					],
					"port": "443",
					"path": [
						"workflows",
						"ea2f7dcddf3149f9b78d23c02ef650a0",
						"triggers",
						"manual",
						"paths",
						"invoke"
					],
					"query": [
						{
							"key": "api-version",
							"value": "2016-06-01"
						},
						{
							"key": "sp",
							"value": "%2Ftriggers%2Fmanual%2Frun"
						},
						{
							"key": "sv",
							"value": "1.0"
						},
						{
							"key": "sig",
							"value": "S2rgd2KIxpl_jYmDLlgHoXDrWEqvORLAXyufvpRuT4I"
						}
					]
				},
				"description": "When building new forms, use this to test your form data webhook."
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"id": "4ffd138a-0310-4cdb-9803-95b91fe3a137",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"id": "c4ab05d3-8c4f-4407-ad8b-ee2bc132eafd",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"id": "62e6d467-3cc6-48bb-becd-a80ad231dbb2",
			"key": "contactid",
			"value": "ffd5da12-3334-eb11-a813-000d3a79a22c"
		},
		{
			"id": "02cca43f-0761-4c72-87c6-48909fbcb84c",
			"key": "callid",
			"value": "0aae1205-5479-4ea9-a37a-5d81a6593b63"
		},
		{
			"id": "ce44df91-70a8-4bdd-9c9a-bae0d7aec414",
			"key": "formRef",
			"value": "QGate003"
		},
		{
			"id": "ebaf7bda-438b-401d-828d-af1cdf0c91ae",
			"key": "callerNumber",
			"value": "+64205551111"
		},
		{
			"id": "615aca5c-16e1-409c-93b1-85a62a5ee1da",
			"key": "calledInTo",
			"value": "+61288809056"
		},
		{
			"id": "2297dc6d-9b63-43cf-849c-7565016f5fc9",
			"key": "calledInTo",
			"value": "+61288809056"
		}
	],
	"protocolProfileBehavior": {}
}