{
	"ProcessTemplates": [
		{
			"Name": "Synchronize customers from Adobe Commerce/Magento to Salesforce",
			"Modified": "2024-06-07T08:09:53.6990517",
			"Modifier": "janne.pennanen@frends.com",
			"Tags": [],
			"TemplateProcessTags": [],
			"Description": "This process retrieves Customer data from Adobe Commerce (Magento). It performs the necessary mapping to Salesforce Contact format and then transfer the mapped Contacts to Salesforce",
			"Version": 1,
			"UniqueIdentifier": "3853f430-5172-478d-98dc-37ad111babdc",
			"ProcessVariablesJson": "{\"MagentoBaseURL\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"\"},\"MagentoUser\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"\"},\"MagentoPassword\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforceBaseURL\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforceUser\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforcePassword\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforceSecurityToken\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforceClientSecret\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforceAuthURL\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"\"},\"SalesforceClientId\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "Synchronize customers from Adobe Commerce/Magento to Salesforce",
					"Modified": "2024-06-07T08:09:53.6990517",
					"Modifier": "janne.pennanen@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This process retrieves Customer data from Adobe Commerce (Magento). It performs the necessary mapping to Salesforce Contact format and then transfer the mapped Contacts to Salesforce",
					"Version": 1,
					"UniqueIdentifier": "f127c638-4147-4460-874d-3cd741a1c163",
					"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_02plaak</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_1l99foy\" name=\"Obtain authorisation token from Magento\"><bpmn2:incoming>Flow_02plaak</bpmn2:incoming><bpmn2:outgoing>Flow_137djee</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_02plaak\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1l99foy\" /><bpmn2:exclusiveGateway id=\"Gateway_0uysg4q\" name=\"Token received?\" default=\"Flow_1gcszok\"><bpmn2:incoming>Flow_137djee</bpmn2:incoming><bpmn2:outgoing>Flow_1pbxnig</bpmn2:outgoing><bpmn2:outgoing>Flow_1gcszok</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_137djee\" sourceRef=\"Activity_1l99foy\" targetRef=\"Gateway_0uysg4q\" /><bpmn2:task id=\"Activity_184hbu1\" name=\"Get customers from Magento\"><bpmn2:incoming>Flow_1pbxnig</bpmn2:incoming><bpmn2:outgoing>Flow_027e3xc</bpmn2:outgoing><bpmn2:property id=\"Property_04qbr7s\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_0pmo015\"><bpmn2:sourceRef>DataStoreReference_1ijpzkd</bpmn2:sourceRef><bpmn2:targetRef>Property_04qbr7s</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1pbxnig\" name=\"yes\" sourceRef=\"Gateway_0uysg4q\" targetRef=\"Activity_184hbu1\" /><bpmn2:intermediateThrowEvent id=\"Event_020nza2\" name=\"Throw error if obtaining token from Magento failed\"><bpmn2:incoming>Flow_1gcszok</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_1gcszok\" name=\"no\" sourceRef=\"Gateway_0uysg4q\" targetRef=\"Event_020nza2\" /><bpmn2:dataStoreReference id=\"DataStoreReference_1ijpzkd\" name=\"Magento\" /><bpmn2:exclusiveGateway id=\"Gateway_1q0n3yn\" name=\"Get from Magento successful?\" default=\"Flow_03kea75\"><bpmn2:incoming>Flow_027e3xc</bpmn2:incoming><bpmn2:outgoing>Flow_03kea75</bpmn2:outgoing><bpmn2:outgoing>Flow_1802r71</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_027e3xc\" sourceRef=\"Activity_184hbu1\" targetRef=\"Gateway_1q0n3yn\" /><bpmn2:subProcess id=\"Activity_0qnemlk\" name=\"For each Magento customer\"><bpmn2:incoming>Flow_0mtwyth</bpmn2:incoming><bpmn2:outgoing>Flow_0kbmfc7</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_1wlpbjb\"><bpmn2:outgoing>Flow_053fbwc</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_0mjjzei\" name=\"Insert customer as contact to Salesforce\"><bpmn2:incoming>Flow_1t3rlkw</bpmn2:incoming><bpmn2:outgoing>Flow_15tbjxf</bpmn2:outgoing><bpmn2:dataOutputAssociation id=\"DataOutputAssociation_1nlymtj\"><bpmn2:targetRef>DataStoreReference_0rem42t</bpmn2:targetRef></bpmn2:dataOutputAssociation></bpmn2:task><bpmn2:exclusiveGateway id=\"Gateway_0sxx4mw\" name=\"Insert successful?\" default=\"Flow_1nwmsy8\"><bpmn2:incoming>Flow_15tbjxf</bpmn2:incoming><bpmn2:outgoing>Flow_14ora3i</bpmn2:outgoing><bpmn2:outgoing>Flow_1nwmsy8</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:dataStoreReference id=\"DataStoreReference_0rem42t\" name=\"Salesforce\" /><bpmn2:endEvent id=\"Event_1ebrz2v\"><bpmn2:incoming>Flow_14ora3i</bpmn2:incoming><bpmn2:incoming>Flow_0uqlmpf</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_14ora3i\" name=\"yes\" sourceRef=\"Gateway_0sxx4mw\" targetRef=\"Event_1ebrz2v\" /><bpmn2:sequenceFlow id=\"Flow_053fbwc\" sourceRef=\"Event_1wlpbjb\" targetRef=\"Activity_0lnqrtt\" /><bpmn2:exclusiveGateway id=\"Gateway_1g4wrvv\" name=\"Contact already exists?\" default=\"Flow_1t3rlkw\"><bpmn2:incoming>Flow_1cuazxs</bpmn2:incoming><bpmn2:outgoing>Flow_14832rt</bpmn2:outgoing><bpmn2:outgoing>Flow_1t3rlkw</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:task id=\"Activity_028jv27\" name=\"Update contact in Salesforce\"><bpmn2:incoming>Flow_14832rt</bpmn2:incoming><bpmn2:outgoing>Flow_1g6gkb9</bpmn2:outgoing><bpmn2:dataOutputAssociation id=\"DataOutputAssociation_15rzy1t\"><bpmn2:targetRef>DataStoreReference_0rem42t</bpmn2:targetRef></bpmn2:dataOutputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_14832rt\" name=\"yes\" sourceRef=\"Gateway_1g4wrvv\" targetRef=\"Activity_028jv27\" /><bpmn2:sequenceFlow id=\"Flow_1t3rlkw\" name=\"no\" sourceRef=\"Gateway_1g4wrvv\" targetRef=\"Activity_0mjjzei\" /><bpmn2:scriptTask id=\"Activity_0lnqrtt\" name=\"Map customer to Salesforce contact format\"><bpmn2:incoming>Flow_053fbwc</bpmn2:incoming><bpmn2:outgoing>Flow_1l1w2wj</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_15tbjxf\" sourceRef=\"Activity_0mjjzei\" targetRef=\"Gateway_0sxx4mw\" /><bpmn2:exclusiveGateway id=\"Gateway_0uvk4ne\" name=\"Update successful?\" default=\"Flow_17fnqd3\"><bpmn2:incoming>Flow_1g6gkb9</bpmn2:incoming><bpmn2:outgoing>Flow_0uqlmpf</bpmn2:outgoing><bpmn2:outgoing>Flow_17fnqd3</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1g6gkb9\" sourceRef=\"Activity_028jv27\" targetRef=\"Gateway_0uvk4ne\" /><bpmn2:sequenceFlow id=\"Flow_0uqlmpf\" name=\"yes\" sourceRef=\"Gateway_0uvk4ne\" targetRef=\"Event_1ebrz2v\" /><bpmn2:endEvent id=\"Event_0ivu3vi\" name=\"Return if inserting contact failed and add error to error variable\"><bpmn2:incoming>Flow_1nwmsy8</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1nwmsy8\" name=\"no\" sourceRef=\"Gateway_0sxx4mw\" targetRef=\"Event_0ivu3vi\" /><bpmn2:endEvent id=\"Event_1dbiohq\" name=\"Return if updating contact failed and add error to error variable\"><bpmn2:incoming>Flow_17fnqd3</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_17fnqd3\" name=\"no\" sourceRef=\"Gateway_0uvk4ne\" targetRef=\"Event_1dbiohq\" /><bpmn2:task id=\"Activity_050l3bc\" name=\"Check if contact already exists in Salesforce\"><bpmn2:incoming>Flow_1l1w2wj</bpmn2:incoming><bpmn2:outgoing>Flow_1cuazxs</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1l1w2wj\" sourceRef=\"Activity_0lnqrtt\" targetRef=\"Activity_050l3bc\" /><bpmn2:sequenceFlow id=\"Flow_1cuazxs\" sourceRef=\"Activity_050l3bc\" targetRef=\"Gateway_1g4wrvv\" /></bpmn2:subProcess><bpmn2:intermediateThrowEvent id=\"Event_178hiq7\" name=\"Throw error if getting customers from Magento failed\"><bpmn2:incoming>Flow_03kea75</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_03kea75\" name=\"no\" sourceRef=\"Gateway_1q0n3yn\" targetRef=\"Event_178hiq7\" /><bpmn2:endEvent id=\"Event_1ltsdq2\"><bpmn2:incoming>Flow_0kbmfc7</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_0kbmfc7\" sourceRef=\"Activity_0qnemlk\" targetRef=\"Event_1ltsdq2\" /><bpmn2:scriptTask id=\"Activity_19hnylw\" name=\"Assign error variable\"><bpmn2:incoming>Flow_1802r71</bpmn2:incoming><bpmn2:outgoing>Flow_0mtwyth</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0mtwyth\" sourceRef=\"Activity_19hnylw\" targetRef=\"Activity_0qnemlk\" /><bpmn2:sequenceFlow id=\"Flow_1802r71\" name=\"yes\" sourceRef=\"Gateway_1q0n3yn\" targetRef=\"Activity_19hnylw\" /><bpmn2:group id=\"Group_1doixd1\" categoryValueRef=\"CategoryValue_1bloo46\" /></bpmn2:process><bpmn2:category id=\"Category_0mhmklp\"><bpmn2:categoryValue id=\"CategoryValue_1bloo46\" value=\"Get customer data from Magento\" /></bpmn2:category><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=\"702\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"702\" y=\"276\" width=\"37\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1l99foy_di\" bpmnElement=\"Activity_1l99foy\"><dc:Bounds x=\"790\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0uysg4q_di\" bpmnElement=\"Gateway_0uysg4q\" isMarkerVisible=\"true\"><dc:Bounds x=\"945\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"930\" y=\"209\" width=\"80\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_184hbu1_di\" bpmnElement=\"Activity_184hbu1\"><dc:Bounds x=\"1050\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_020nza2_di\" bpmnElement=\"Event_020nza2\"><dc:Bounds x=\"952\" y=\"362\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"932\" y=\"407.5\" width=\"76\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_1ijpzkd_di\" bpmnElement=\"DataStoreReference_1ijpzkd\"><dc:Bounds x=\"1075\" y=\"115\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1078\" y=\"92\" width=\"44\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1q0n3yn_di\" bpmnElement=\"Gateway_1q0n3yn\" isMarkerVisible=\"true\"><dc:Bounds x=\"1215\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1195\" y=\"195.5\" width=\"90\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0qnemlk_di\" bpmnElement=\"Activity_0qnemlk\" isExpanded=\"true\"><dc:Bounds x=\"1470\" y=\"-20\" width=\"1080\" height=\"600\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1wlpbjb_di\" bpmnElement=\"Event_1wlpbjb\"><dc:Bounds x=\"1522\" y=\"245\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0mjjzei_di\" bpmnElement=\"Activity_0mjjzei\"><dc:Bounds x=\"2090\" y=\"360\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0sxx4mw_di\" bpmnElement=\"Gateway_0sxx4mw\" isMarkerVisible=\"true\"><dc:Bounds x=\"2265\" y=\"375\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2246\" y=\"338\" width=\"89\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_0rem42t_di\" bpmnElement=\"DataStoreReference_0rem42t\"><dc:Bounds x=\"2115\" y=\"238\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2174\" y=\"254\" width=\"53\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1ebrz2v_di\" bpmnElement=\"Event_1ebrz2v\"><dc:Bounds x=\"2482\" y=\"245\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1g4wrvv_di\" bpmnElement=\"Gateway_1g4wrvv\" isMarkerVisible=\"true\"><dc:Bounds x=\"1945\" y=\"238\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2004\" y=\"256\" width=\"79\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_028jv27_di\" bpmnElement=\"Activity_028jv27\"><dc:Bounds x=\"2090\" y=\"80\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0lnqrtt_di\" bpmnElement=\"Activity_0lnqrtt\"><dc:Bounds x=\"1630\" y=\"223\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0uvk4ne_di\" bpmnElement=\"Gateway_0uvk4ne\" isMarkerVisible=\"true\"><dc:Bounds x=\"2265\" y=\"95\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2261\" y=\"57.5\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0ivu3vi_di\" bpmnElement=\"Event_0ivu3vi\"><dc:Bounds x=\"2272\" y=\"482\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2247\" y=\"525\" width=\"87\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_050l3bc_di\" bpmnElement=\"Activity_050l3bc\"><dc:Bounds x=\"1790\" y=\"223\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1dbiohq_di\" bpmnElement=\"Event_1dbiohq\"><dc:Bounds x=\"2272\" y=\"202\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2246\" y=\"248\" width=\"88\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_14ora3i_di\" bpmnElement=\"Flow_14ora3i\"><di:waypoint x=\"2315\" y=\"400\" /><di:waypoint x=\"2380\" y=\"400\" /><di:waypoint x=\"2380\" y=\"263\" /><di:waypoint x=\"2482\" y=\"263\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2331\" y=\"383\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_053fbwc_di\" bpmnElement=\"Flow_053fbwc\"><di:waypoint x=\"1558\" y=\"263\" /><di:waypoint x=\"1630\" y=\"263\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_14832rt_di\" bpmnElement=\"Flow_14832rt\"><di:waypoint x=\"1970\" y=\"238\" /><di:waypoint x=\"1970\" y=\"120\" /><di:waypoint x=\"2090\" y=\"120\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1981\" y=\"175\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1t3rlkw_di\" bpmnElement=\"Flow_1t3rlkw\"><di:waypoint x=\"1970\" y=\"288\" /><di:waypoint x=\"1970\" y=\"400\" /><di:waypoint x=\"2090\" y=\"400\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1983\" y=\"334\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_15tbjxf_di\" bpmnElement=\"Flow_15tbjxf\"><di:waypoint x=\"2190\" y=\"400\" /><di:waypoint x=\"2265\" y=\"400\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1g6gkb9_di\" bpmnElement=\"Flow_1g6gkb9\"><di:waypoint x=\"2190\" y=\"120\" /><di:waypoint x=\"2265\" y=\"120\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0uqlmpf_di\" bpmnElement=\"Flow_0uqlmpf\"><di:waypoint x=\"2315\" y=\"120\" /><di:waypoint x=\"2380\" y=\"120\" /><di:waypoint x=\"2380\" y=\"263\" /><di:waypoint x=\"2482\" y=\"263\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2331\" y=\"103\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1nwmsy8_di\" bpmnElement=\"Flow_1nwmsy8\"><di:waypoint x=\"2290\" y=\"425\" /><di:waypoint x=\"2290\" y=\"482\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2295\" y=\"447\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_17fnqd3_di\" bpmnElement=\"Flow_17fnqd3\"><di:waypoint x=\"2290\" y=\"145\" /><di:waypoint x=\"2290\" y=\"202\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2294\" y=\"167\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1l1w2wj_di\" bpmnElement=\"Flow_1l1w2wj\"><di:waypoint x=\"1730\" y=\"263\" /><di:waypoint x=\"1790\" y=\"263\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1cuazxs_di\" bpmnElement=\"Flow_1cuazxs\"><di:waypoint x=\"1890\" y=\"263\" /><di:waypoint x=\"1945\" y=\"263\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Event_178hiq7_di\" bpmnElement=\"Event_178hiq7\"><dc:Bounds x=\"1222\" y=\"362\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1196\" y=\"407.5\" width=\"87\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1ltsdq2_di\" bpmnElement=\"Event_1ltsdq2\"><dc:Bounds x=\"2622\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_19hnylw_di\" bpmnElement=\"Activity_19hnylw\"><dc:Bounds x=\"1365\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_1doixd1_di\" bpmnElement=\"Group_1doixd1\"><dc:Bounds x=\"760\" y=\"-20\" width=\"570\" height=\"600\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1012\" y=\"-13\" width=\"67\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_02plaak_di\" bpmnElement=\"Flow_02plaak\"><di:waypoint x=\"738\" y=\"258\" /><di:waypoint x=\"790\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_137djee_di\" bpmnElement=\"Flow_137djee\"><di:waypoint x=\"890\" y=\"258\" /><di:waypoint x=\"945\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataInputAssociation_0pmo015_di\" bpmnElement=\"DataInputAssociation_0pmo015\"><di:waypoint x=\"1100\" y=\"165\" /><di:waypoint x=\"1100\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1pbxnig_di\" bpmnElement=\"Flow_1pbxnig\"><di:waypoint x=\"995\" y=\"258\" /><di:waypoint x=\"1050\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1014\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1gcszok_di\" bpmnElement=\"Flow_1gcszok\"><di:waypoint x=\"970\" y=\"283\" /><di:waypoint x=\"970\" y=\"362\" /><bpmndi:BPMNLabel><dc:Bounds x=\"948\" y=\"309\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_027e3xc_di\" bpmnElement=\"Flow_027e3xc\"><di:waypoint x=\"1150\" y=\"258\" /><di:waypoint x=\"1215\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataOutputAssociation_1nlymtj_di\" bpmnElement=\"DataOutputAssociation_1nlymtj\"><di:waypoint x=\"2140\" y=\"360\" /><di:waypoint x=\"2140\" y=\"288\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataOutputAssociation_15rzy1t_di\" bpmnElement=\"DataOutputAssociation_15rzy1t\"><di:waypoint x=\"2140\" y=\"160\" /><di:waypoint x=\"2140\" y=\"238\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_03kea75_di\" bpmnElement=\"Flow_03kea75\"><di:waypoint x=\"1240\" y=\"283\" /><di:waypoint x=\"1240\" y=\"362\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1218\" y=\"311\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0kbmfc7_di\" bpmnElement=\"Flow_0kbmfc7\"><di:waypoint x=\"2550\" y=\"258\" /><di:waypoint x=\"2622\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0mtwyth_di\" bpmnElement=\"Flow_0mtwyth\"><di:waypoint x=\"1395\" y=\"258\" /><di:waypoint x=\"1470\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1802r71_di\" bpmnElement=\"Flow_1802r71\"><di:waypoint x=\"1265\" y=\"258\" /><di:waypoint x=\"1365\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1307\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></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_1l99foy\",\"Type\":1,\"Parameters\":{\"input\":{\"Method\":{\"mode\":\"select\",\"value\":\"POST\"},\"ResultMethod\":{\"mode\":\"select\",\"value\":\"JToken\"},\"Url\":{\"mode\":\"text\",\"value\":\"{{#var.MagentoBaseURL}}/index.php/rest/V1/integration/admin/token\"},\"Message\":{\"mode\":\"text\",\"value\":\"{\\r\\n    \\\"username\\\": {{\\\"\\\\\\\"\\\" + #var.MagentoUser + \\\"\\\\\\\"\\\"}},\\r\\n    \\\"password\\\": {{\\\"\\\\\\\"\\\" + #var.MagentoPassword.Replace(\\\"\\\\\\\"\\\", \\\"\\\\\\\\\\\\\\\"\\\") + \\\"\\\\\\\"\\\"}}\\r\\n}\"},\"Headers\":[{\"Name\":{\"mode\":\"text\",\"value\":\"Content-Type\"},\"Value\":{\"mode\":\"text\",\"value\":\"application/json\"}}]},\"options\":{\"Authentication\":{\"mode\":\"select\",\"value\":\"None\"},\"Username\":{\"mode\":\"text\",\"value\":\"\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"},\"Token\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateSource\":{\"mode\":\"select\",\"value\":\"CertificateStore\"},\"ClientCertificateFilePath\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateInBase64\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateKeyPhrase\":{\"mode\":\"text\",\"value\":\"\"},\"CertificateThumbprint\":{\"mode\":\"text\",\"value\":\"\"},\"LoadEntireChainForCertificate\":{\"mode\":\"toggle\",\"value\":true},\"ConnectionTimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"FollowRedirects\":{\"mode\":\"toggle\",\"value\":true},\"AllowInvalidCertificate\":{\"mode\":\"toggle\",\"value\":false},\"AllowInvalidResponseContentTypeCharSet\":{\"mode\":\"toggle\",\"value\":false},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false},\"AutomaticCookieHandling\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/d2f2020e-4ce6-4e5f-879f-ef34e57c9fca/v1\",\"PromoteResultAs\":null,\"Name\":\"Obtain authorisation token from Magento\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":true,\"ShouldDispose\":null},{\"Id\":\"Gateway_0uysg4q\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.StatusCode == 200\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Token received?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1pbxnig\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_184hbu1\",\"Type\":1,\"Parameters\":{\"input\":{\"Method\":{\"mode\":\"select\",\"value\":\"GET\"},\"ResultMethod\":{\"mode\":\"select\",\"value\":\"JToken\"},\"Url\":{\"mode\":\"text\",\"value\":\"{{#var.MagentoBaseURL}}/rest/V1/customers/search?searchCriteria[sortOrders][0]\"},\"Message\":{\"mode\":\"text\",\"value\":\"\"},\"Headers\":[]},\"options\":{\"Authentication\":{\"mode\":\"select\",\"value\":\"OAuth\"},\"Username\":{\"mode\":\"text\",\"value\":\"\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"},\"Token\":{\"mode\":\"csharp\",\"value\":\"#result[Obtain authorisation token from Magento].Body\"},\"ClientCertificateSource\":{\"mode\":\"select\",\"value\":\"CertificateStore\"},\"ClientCertificateFilePath\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateInBase64\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateKeyPhrase\":{\"mode\":\"text\",\"value\":\"\"},\"CertificateThumbprint\":{\"mode\":\"text\",\"value\":\"\"},\"LoadEntireChainForCertificate\":{\"mode\":\"toggle\",\"value\":true},\"ConnectionTimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"FollowRedirects\":{\"mode\":\"toggle\",\"value\":true},\"AllowInvalidCertificate\":{\"mode\":\"toggle\",\"value\":false},\"AllowInvalidResponseContentTypeCharSet\":{\"mode\":\"toggle\",\"value\":false},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false},\"AutomaticCookieHandling\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/d2f2020e-4ce6-4e5f-879f-ef34e57c9fca/v1\",\"PromoteResultAs\":null,\"Name\":\"Get customers from Magento\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_020nza2\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"$\\\"An exception occurred when trying to obtain authorisation token from Magento: {#result[Obtain authorisation token from Magento].Body.message}\\\"\"},\"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_1gcszok\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_1ijpzkd\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Magento\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1q0n3yn\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.StatusCode == 200\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Get from Magento successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1wlpbjb\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0qnemlk\",\"Type\":10,\"Parameters\":{\"variable\":\"magentoCustomer\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Get customers from Magento].Body.items\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For each Magento customer\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_178hiq7\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"$\\\"An exception occurred when trying to get customer data from Magento: {#result[Get customers from Magento].Body.message}\\\"\"},\"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_03kea75\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0mjjzei\",\"Type\":1,\"Parameters\":{\"input\":{\"Domain\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceBaseURL\"},\"SObjectAsJson\":{\"mode\":\"csharp\",\"value\":\"#var.mappedCustomer\"},\"SObjectType\":{\"mode\":\"text\",\"value\":\"Contact\"}},\"options\":{\"AuthenticationMethod\":{\"mode\":\"select\",\"value\":\"OAuth2WithPassword\"},\"AccessToken\":{\"mode\":\"text\",\"value\":\"\"},\"AuthUrl\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceAuthURL\"},\"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}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/c5fbbd06-fd05-4d72-af74-ae8805a458de/v1\",\"PromoteResultAs\":null,\"Name\":\"Insert customer as contact to Salesforce\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0sxx4mw\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.RequestIsSuccessful\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Insert successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_0rem42t\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Salesforce\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_14ora3i\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1ebrz2v\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1ltsdq2\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.Errors != \\\"\\\" ? \\\"Magento customers synced to Salesforce. The following errors occurred: \\\" + #var.Errors : \\\"Magento customers succesfully synced to Salesforce.\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1g4wrvv\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"(int)#result.Body[\\\"totalSize\\\"] != 0\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Contact already exists?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_14832rt\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_028jv27\",\"Type\":1,\"Parameters\":{\"input\":{\"Domain\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceBaseURL\"},\"SObjectAsJson\":{\"mode\":\"csharp\",\"value\":\"#var.mappedCustomer\"},\"SObjectId\":{\"mode\":\"csharp\",\"value\":\"#result[Check if contact already exists in Salesforce].Body[\\\"records\\\"][0][\\\"Id\\\"]\"},\"SObjectType\":{\"mode\":\"text\",\"value\":\"Contact\"}},\"options\":{\"AuthenticationMethod\":{\"mode\":\"select\",\"value\":\"OAuth2WithPassword\"},\"AccessToken\":{\"mode\":\"text\",\"value\":\"\"},\"AuthUrl\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceAuthURL\"},\"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/401db187-fbf0-4886-b7bc-927ac0c35324/v1\",\"PromoteResultAs\":null,\"Name\":\"Update contact in Salesforce\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1t3rlkw\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"FrendsTestElementId\",\"Type\":19,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Test\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0lnqrtt\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\r\\n    dynamic json = new JObject();\\r\\n    json.Birthdate = #var.magentoCustomer.dob;\\r\\n    json.Email = #var.magentoCustomer.email;\\r\\n    json.FirstName = #var.magentoCustomer.firstname;\\r\\n    json.LastName = #var.magentoCustomer.lastname;\\r\\n\\r\\n    // Handle Magento customer primary address\\r\\n    if (#var.magentoCustomer.addresses.Count > 0)\\r\\n    {\\r\\n        var address0 = #var.magentoCustomer.addresses[0];\\r\\n        json.Phone = address0.telephone;\\r\\n        json.MobilePhone = address0.telephone;\\r\\n        json.Fax = address0.fax;\\r\\n        json.MailingCity = address0.city;\\r\\n        json.MailingCountry = address0.country_id;\\r\\n        json.MailingPostalCode = address0.postcode;\\r\\n        json.MailingState = address0.region.region;\\r\\n\\r\\n        // Handle multiple possible street address lines\\r\\n        foreach (var line in address0.street)\\r\\n        {\\r\\n            json.MailingStreet += $\\\"{line} \\\";\\r\\n        }\\r\\n    }\\r\\n\\r\\n    // Handle Magento customer secondary address\\r\\n    if (#var.magentoCustomer.addresses.Count >= 2)\\r\\n    {\\r\\n        var address1 = #var.magentoCustomer.addresses[1];\\r\\n        json.OtherCity = address1.city;\\r\\n        json.OtherCountry = address1.country_id;\\r\\n        json.OtherPostalCode = address1.postcode;\\r\\n        json.OtherState = address1.region.region;\\r\\n        json.OtherPhone = address1.telephone;\\r\\n\\r\\n        // Handle multiple possible street address lines\\r\\n        foreach (var line in address1.street)\\r\\n        {\\r\\n            json.OtherStreet += $\\\"{line} \\\";\\r\\n        }\\r\\n    }\\r\\n\\r\\n    return json.ToString();\\r\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"mappedCustomer\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Map customer to Salesforce contact format\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0uvk4ne\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.RequestIsSuccessful\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Update successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0uqlmpf\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1nwmsy8\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0ivu3vi\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.Errors += $\\\"\\\\nAn error occurred inserting customer {#var.magentoCustomer.firstname} {#var.magentoCustomer.lastname} to Salesforce.\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_17fnqd3\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1dbiohq\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.Errors += $\\\"\\\\nAn error occurred updating customer {#var.magentoCustomer.firstname} {#var.magentoCustomer.lastname} to Salesforce.\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_19hnylw\",\"Type\":12,\"Parameters\":{\"variableName\":\"Errors\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"\\\"\\\"\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Assign error variable\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1802r71\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_050l3bc\",\"Type\":1,\"Parameters\":{\"input\":{\"Domain\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceBaseURL\"},\"Query\":{\"mode\":\"text\",\"value\":\"SELECT Id FROM Contact WHERE Email = '{{#var.magentoCustomer.email}}'\"}},\"options\":{\"AuthenticationMethod\":{\"mode\":\"select\",\"value\":\"OAuth2WithPassword\"},\"AccessToken\":{\"mode\":\"text\",\"value\":\"\"},\"AuthUrl\":{\"mode\":\"csharp\",\"value\":\"#var.SalesforceAuthURL\"},\"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\":\"Check if contact already exists in Salesforce\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"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/D2F2020E-4CE6-4E5F-879F-EF34E57C9FCA/v1\",\"/ProcessTask/12E91C58-734A-451E-87E2-4C23385C1C43/v1\",\"/ProcessTask/401DB187-FBF0-4886-B7BC-927AC0C35324/v1\",\"/ProcessTask/C5FBBD06-FD05-4D72-AF74-AE8805A458DE/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.2.1685",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 0,
					"MinorVersion": 1,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"f127c638-4147-4460-874d-3cd741a1c163": [
						{
							"Id": "d2f2020e-4ce6-4e5f-879f-ef34e57c9fca",
							"PackageId": "Frends.HTTP.Request",
							"PackageVersion": "1.1.2",
							"Name": "Frends.HTTP.Request.HTTP.Request(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"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": "401db187-fbf0-4886-b7bc-927ac0c35324",
							"PackageId": "Frends.Salesforce.UpdateSObject",
							"PackageVersion": "1.0.0",
							"Name": "Frends.Salesforce.UpdateSObject.Salesforce.UpdateSObject(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "c5fbbd06-fd05-4d72-af74-ae8805a458de",
							"PackageId": "Frends.Salesforce.CreateSObject",
							"PackageVersion": "1.0.1",
							"Name": "Frends.Salesforce.CreateSObject.Salesforce.CreateSObject(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}