{
	"ProcessTemplates": [
		{
			"Name": "Salesforce to JSON - Contacts",
			"Modified": "2024-07-09T09:11:49.3697649",
			"Modifier": "janne.pennanen@frends.com",
			"Tags": [
				"Json",
				"Salesforce"
			],
			"TemplateProcessTags": [],
			"Description": "This template process exports contact data from Salesforce into a JSON file that is then saved locally.",
			"Version": 1,
			"UniqueIdentifier": "500f31af-bb93-4ec1-aef8-7a2784e83688",
			"ProcessVariablesJson": "{\"SalesforceBaseUrl\":{\"Value\":\"\\\"https://<my-salesforce-instance>.my.salesforce.com\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The base URL for your Salesforce instance, ending in my.salesforce.com.\"},\"SalesforceUser\":{\"Value\":\"\\\"myUsername\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The username for your Salesforce account.\"},\"SalesforcePassword\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The password for your Salesforce account.\"},\"SalesforceSecurityToken\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The security token for Salesforce.\"},\"SalesforceClientID\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The client ID for Salesforce.\"},\"SalesforceClientSecret\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The client secret for Salesforce.\"},\"OutFilePath\":{\"Value\":\"\\\"/path/output-file-name.json\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The full path to the desired output location, including the name of the file to be written.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "Salesforce to JSON - Contacts",
					"Modified": "2024-07-09T09:11:49.3697649",
					"Modifier": "janne.pennanen@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This template process exports contact data from Salesforce into a JSON file that is then saved locally.",
					"Version": 1,
					"UniqueIdentifier": "4a6fd706-b8ae-446b-8817-96116d6442a0",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual\"><bpmn2:outgoing>Flow_0o9s2k3</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_0683w1t\" name=\"Get contacts from Salesforce\"><bpmn2:incoming>Flow_0o9s2k3</bpmn2:incoming><bpmn2:outgoing>Flow_12k7k3m</bpmn2:outgoing><bpmn2:property id=\"Property_0twlf83\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_0rrkhuq\"><bpmn2:sourceRef>DataStoreReference_1m8kw5f</bpmn2:sourceRef><bpmn2:targetRef>Property_0twlf83</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0o9s2k3\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_0683w1t\" /><bpmn2:dataStoreReference id=\"DataStoreReference_1m8kw5f\" name=\"Salesforce\" /><bpmn2:exclusiveGateway id=\"Gateway_1aekzsv\" name=\"Contacts gotten successfully?\" default=\"Flow_0s1iaph\"><bpmn2:incoming>Flow_12k7k3m</bpmn2:incoming><bpmn2:outgoing>Flow_0s1iaph</bpmn2:outgoing><bpmn2:outgoing>Flow_1b9qt29</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_12k7k3m\" sourceRef=\"Activity_0683w1t\" targetRef=\"Gateway_1aekzsv\" /><bpmn2:intermediateThrowEvent id=\"Event_1aawgwu\" name=\"Throw exception if contacts couldn&#39;t be fetched\"><bpmn2:incoming>Flow_0s1iaph</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0s1iaph\" name=\"no\" sourceRef=\"Gateway_1aekzsv\" targetRef=\"Event_1aawgwu\" /><bpmn2:endEvent id=\"Event_03urunm\"><bpmn2:incoming>Flow_0b8l8l4</bpmn2:incoming></bpmn2:endEvent><bpmn2:task id=\"Activity_1qigeon\" name=\"Write JSON file\"><bpmn2:incoming>Flow_1b9qt29</bpmn2:incoming><bpmn2:outgoing>Flow_0b8l8l4</bpmn2:outgoing><bpmn2:dataOutputAssociation id=\"DataOutputAssociation_1j9fv73\"><bpmn2:targetRef>DataObjectReference_18wbvtf</bpmn2:targetRef></bpmn2:dataOutputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1b9qt29\" name=\"yes\" sourceRef=\"Gateway_1aekzsv\" targetRef=\"Activity_1qigeon\" /><bpmn2:sequenceFlow id=\"Flow_0b8l8l4\" sourceRef=\"Activity_1qigeon\" targetRef=\"Event_03urunm\" /><bpmn2:dataObjectReference id=\"DataObjectReference_18wbvtf\" name=\"JSON file to local fileshare\" dataObjectRef=\"DataObject_0bcxcpo\" /><bpmn2:dataObject id=\"DataObject_0bcxcpo\" /><bpmn2:textAnnotation id=\"TextAnnotation_085oq87\"><bpmn2:text>If a file with the same name already exists, an error will be thrown. This behavior can be changed in the task settings.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_1i6irsb\" sourceRef=\"DataObjectReference_18wbvtf\" targetRef=\"TextAnnotation_085oq87\" /></bpmn2:process><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"412\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0683w1t_di\" bpmnElement=\"Activity_0683w1t\"><dc:Bounds x=\"530\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_1m8kw5f_di\" bpmnElement=\"DataStoreReference_1m8kw5f\"><dc:Bounds x=\"555\" y=\"115\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"553\" y=\"93\" width=\"53\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1aekzsv_di\" bpmnElement=\"Gateway_1aekzsv\" isMarkerVisible=\"true\"><dc:Bounds x=\"715\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"701\" y=\"196\" width=\"78\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1aawgwu_di\" bpmnElement=\"Event_1aawgwu\"><dc:Bounds x=\"722\" y=\"342\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"695\" y=\"385\" width=\"90\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_03urunm_di\" bpmnElement=\"Event_03urunm\"><dc:Bounds x=\"1042\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1qigeon_di\" bpmnElement=\"Activity_1qigeon\"><dc:Bounds x=\"850\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_18wbvtf_di\" bpmnElement=\"DataObjectReference_18wbvtf\"><dc:Bounds x=\"882\" y=\"115\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"858\" y=\"86\" width=\"85\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_085oq87_di\" bpmnElement=\"TextAnnotation_085oq87\"><dc:Bounds x=\"1000\" y=\"70\" width=\"150\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"DataInputAssociation_0rrkhuq_di\" bpmnElement=\"DataInputAssociation_0rrkhuq\"><di:waypoint x=\"580\" y=\"165\" /><di:waypoint x=\"580\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0o9s2k3_di\" bpmnElement=\"Flow_0o9s2k3\"><di:waypoint x=\"448\" y=\"258\" /><di:waypoint x=\"530\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_12k7k3m_di\" bpmnElement=\"Flow_12k7k3m\"><di:waypoint x=\"630\" y=\"258\" /><di:waypoint x=\"715\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0s1iaph_di\" bpmnElement=\"Flow_0s1iaph\"><di:waypoint x=\"740\" y=\"283\" /><di:waypoint x=\"740\" y=\"342\" /><bpmndi:BPMNLabel><dc:Bounds x=\"749\" y=\"310\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataOutputAssociation_1j9fv73_di\" bpmnElement=\"DataOutputAssociation_1j9fv73\"><di:waypoint x=\"900\" y=\"218\" /><di:waypoint x=\"900\" y=\"165\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1b9qt29_di\" bpmnElement=\"Flow_1b9qt29\"><di:waypoint x=\"765\" y=\"258\" /><di:waypoint x=\"850\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"799\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0b8l8l4_di\" bpmnElement=\"Flow_0b8l8l4\"><di:waypoint x=\"950\" y=\"258\" /><di:waypoint x=\"1042\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_1i6irsb_di\" bpmnElement=\"Association_1i6irsb\"><di:waypoint x=\"920\" y=\"140\" /><di:waypoint x=\"1000\" y=\"110\" /></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0683w1t\",\"Type\":1,\"Parameters\":{\"input\":{\"Domain\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceBaseUrl\"},\"Query\":{\"mode\":\"text\",\"value\":\"SELECT Id, AssistantName, AssistantPhone, Email, FirstName, LastName, Description, Fax, HomePhone, MobilePhone, OtherPhone, MailingCity, MailingCountry, MailingPostalCode, MailingStreet, MailingState, OtherCity, OtherCountry, OtherPostalCode, OtherStreet, OtherState, Salutation, Title FROM Contact\"}},\"options\":{\"AuthenticationMethod\":{\"mode\":\"select\",\"value\":\"OAuth2WithPassword\"},\"AccessToken\":{\"mode\":\"text\",\"value\":\"\"},\"AuthUrl\":{\"mode\":\"text\",\"value\":\"https://login.salesforce.com/services/oauth2/token\"},\"ClientID\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceClientID\"},\"ClientSecret\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceClientSecret\"},\"Username\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceUser\"},\"Password\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforcePassword\"},\"SecurityToken\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceSecurityToken\"},\"ReturnAccessToken\":{\"mode\":\"toggle\",\"value\":false},\"ThrowAnErrorIfNotFound\":{\"mode\":\"toggle\",\"value\":false}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/12e91c58-734a-451e-87e2-4c23385c1c43/v1\",\"PromoteResultAs\":null,\"Name\":\"Get contacts from Salesforce\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_1m8kw5f\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Salesforce\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1aekzsv\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.RequestIsSuccessful\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Contacts gotten successfully?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1aawgwu\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An exception occurred when attempting to get contacts from Salesforce:\\r\\n\\r\\n{{#result.ErrorMessage}}\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0s1iaph\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_03urunm\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"Contacts succesfully exported to JSON: {{#result.Path}}\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1b9qt29\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1qigeon\",\"Type\":1,\"Parameters\":{\"input\":{\"Content\":{\"mode\":\"csharp\",\"value\":\"#result[Get contacts from Salesforce].Body[\\\"records\\\"].ToString()\",\"disableWordWrap\":false},\"Path\":{\"mode\":\"csharp\",\"value\":\"#var.OutFilePath\"}},\"options\":{\"UseGivenUserCredentialsForRemoteConnections\":{\"mode\":\"toggle\",\"value\":false},\"UserName\":{\"mode\":\"text\",\"value\":\"domain\\\\username\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"},\"FileEncoding\":{\"mode\":\"select\",\"value\":\"UTF8\"},\"EnableBom\":{\"mode\":\"toggle\",\"value\":false},\"EncodingInString\":{\"mode\":\"text\",\"value\":\"\"},\"WriteBehaviour\":{\"mode\":\"select\",\"value\":\"Throw\"}}},\"SelectedTypeId\":\"/ProcessTask/0f7c0838-132b-4fe3-a7eb-f5bf9ba48e80/v1\",\"PromoteResultAs\":null,\"Name\":\"Write JSON file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_18wbvtf\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"JSON file to local fileshare\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/12E91C58-734A-451E-87E2-4C23385C1C43/v1\",\"/ProcessTask/0F7C0838-132B-4FE3-A7EB-F5BF9BA48E80/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.3.1743",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"4a6fd706-b8ae-446b-8817-96116d6442a0": [
						{
							"Id": "12e91c58-734a-451e-87e2-4c23385c1c43",
							"PackageId": "Frends.Salesforce.ExecuteQuery",
							"PackageVersion": "1.0.1",
							"Name": "Frends.Salesforce.ExecuteQuery.Salesforce.ExecuteQuery(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "0f7c0838-132b-4fe3-a7eb-f5bf9ba48e80",
							"PackageId": "Frends.Files.Write",
							"PackageVersion": "1.0.1",
							"Name": "Frends.Files.Write.Files.Write(Input, Options)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}