diff --git a/provision/700_crm/0001_templates.yaml b/provision/700_crm/0001_templates.yaml new file mode 100644 index 000000000..f4c531d83 --- /dev/null +++ b/provision/700_crm/0001_templates.yaml @@ -0,0 +1,22 @@ +templates: + quote: + type: text/html + template: "

Details of Quote: {{.quote.values.QuoteNumber}} - {{.quote.values.Name}}

\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n Quote Information\r\n

\r\n Quote Number: {{.quote.values.QuoteNumber}}
\r\n Quote Name: {{.quote.values.Name}}
\r\n Expiration Date: {{.quote.values.ExpirationDate}}
\r\n Description: {{.quote.values.Description}}\r\n
\r\n Primary contact data\r\n

\r\n Contact Name: {{.quote.values.ContactId}}
\r\n Email: {{.quote.values.Email}}
\r\n Phone: {{.quote.values.Phon}}\r\n
\r\n Totals
\r\n
\r\n Subtotal: {{.quote.values.Subtotal}}
\r\n Additional Discount: {{.quote.values.Discount}}
\r\n Shipping and Handling: {{.quote.values.ShippingHandling}}
\r\n Total Price: {{.quote.values.TotalPrice}}
\r\n Tax: {{.quote.values.Tax}}
\r\n Grand Total: {{.quote.values.GrandTotal}}\r\n
\r\n Products\r\n

\r\n {{range $index, $element := .lineItems}}\r\n Price:{{$element.values.UnitPrice}}
\r\n Quantity:{{$element.values.Quantity}}
\r\n Subtotal:{{$element.values.Subtotal}}
\r\n Discount:{{$element.values.Discount}}
\r\n Total Price:{{$element.values.TotalPrice}}
\r\n -------------------------
\r\n {{end}}\r\n
\r\n Bill To
\r\n
\r\n Bill to Name: {{.quote.values.BillingName}}
\r\n Bill to Street: {{.quote.values.BillingStreet}}
\r\n Bill to City: {{.quote.values.BillingCity}}
\r\n Bill to State: {{.quote.values.BillingState}}
\r\n Bill to Postal Code: {{.quote.values.BillingPostalCode}}
\r\n Bill to Country: {{.quote.values.BillingCountry}}\r\n
\r\n Quote To
\r\n
\r\n Quote to Name: {{.quote.values.QuoteToName}}
\r\n Quote to Street: {{.quote.values.QuoteToStreet}}
\r\n Quote to City: {{.quote.values.QuoteToCity}}
\r\n Quote to State: {{.quote.values.QuoteToState}}
\r\n Quote to Postal Code: {{.quote.values.QuoteToPostalCode}}
\r\n Quote to Country: {{.quote.values.QuoteToCountry}}\r\n
\r\n Ship To
\r\n
\r\n Ship to Name: {{.quote.values.ShippingName}}
\r\n Ship to Street: {{.quote.values.ShippingStreet}}
\r\n Ship to City: {{.quote.values.ShippingCity}}
\r\n Ship to State: {{.quote.values.ShippingState}}
\r\n Ship to Postal Code: {{.quote.values.ShippingPostalCode}}
\r\n Ship to Country: {{.quote.values.ShippingCountry}}\r\n
" + meta: + short: quote + description: quote + lead_converted_content: + type: text/html + template: | +

The following lead has been converted:

+ + {{template "record_table" .account }} + meta: + short: Lead Converted (Content) + description: The lead was converted + lead_converted_subject: + type: text/plain + template: Lead {{ .lead.values.FirstName }} {{ .lead.values.LastName }} from {{ .lead.values.Company }} has been converted + meta: + short: Lead Converted (subject) + description: lead_converted_subject \ No newline at end of file diff --git a/provision/700_crm/1100_modules.yaml b/provision/700_crm/1100_modules.yaml index 6620625fd..1b9318f43 100644 --- a/provision/700_crm/1100_modules.yaml +++ b/provision/700_crm/1100_modules.yaml @@ -6055,6 +6055,7 @@ modules: CampaignId: label: Primary Campaign Source kind: Record + multi: true options: labelField: Name module: Campaigns @@ -7541,7 +7542,7 @@ modules: expressions: validators: - test: "value < 0" - error: Discount cannot be a negative number + error: Discount can not be a negative number Email: label: Email kind: Email @@ -8616,7 +8617,7 @@ modules: expressions: validators: - test: "value < 0" - error: Shipping and Handling cannot be a negative number + error: Shipping and Handling can not be a negative number Status: label: Status @@ -8650,7 +8651,7 @@ modules: expressions: validators: - test: "value < 0" - error: Sub total cannot be a negative number + error: Sub total can not be a negative number Tax: label: Tax kind: Number @@ -8661,7 +8662,7 @@ modules: expressions: validators: - test: "value < 0" - error: Tax cannot be a negative number + error: Tax can not be a negative number TotalPrice: label: Total Price (calculated) kind: Number diff --git a/provision/700_crm/1400_pages.yaml b/provision/700_crm/1400_pages.yaml index a40aa3cef..100c58466 100644 --- a/provision/700_crm/1400_pages.yaml +++ b/provision/700_crm/1400_pages.yaml @@ -415,11 +415,13 @@ pages: - enabled: true label: Convert this Lead into an Account resourceType: compose:record - script: /client-scripts/compose/crm/Lead/ToAccount.js:default + workflow: CRM-Lead-ToAccount + stepID: 3 - enabled: true label: Convert this Lead into an Account and Opportunity resourceType: compose:record - script: /client-scripts/compose/crm/Lead/ToAccountAndOpportunity.js:default + workflow: CRM-Lead-ToAccountAndOpportunity + stepID: 77 sealed: false style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} @@ -790,16 +792,19 @@ pages: - enabled: true label: Create new Opportunity from this Account resourceType: compose:record - script: /client-scripts/compose/crm/Account/CreateNewOpportunity.js:default + workflow: CRM-Account-CreateNewOpportunity + stepID: 3 - enabled: true label: Create new Contract from this Account resourceType: compose:record - script: /client-scripts/compose/crm/Account/CreateNewContract.js:default + workflow: CRM-Account-CreateNewContract + stepID: 3 - enabled: true label: Create new Case from this Account resourceType: compose:record - script: /client-scripts/compose/crm/Account/CreateNewCase.js:default - sealed: false + workflow: CRM-Account-CreateNewCase + stepID: 14 + sealed: false style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} kind: Automation @@ -1033,7 +1038,8 @@ pages: - enabled: true label: Create a new Case for this Contact and Account resourceType: compose:record - script: /client-scripts/compose/crm/Contact/CreateNewCase.js:default + workflow: CRM-Contact-CreateNewCase + stepID: 3 sealed: false style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} @@ -1310,11 +1316,13 @@ pages: label: Update prices of Products by applying the selected Price Book and inserted discounts resourceType: compose:record - script: /client-scripts/compose/crm/Opportunity/ApplyPriceBook.js:default + workflow: CRM-Opportunity-ApplyPriceBook + stepID: 3 - enabled: true label: Create a new Quote for this Opportunity resourceType: compose:record - script: /client-scripts/compose/crm/Opportunity/NewQuote.js:default + workflow: CRM-Opportunity-NewQuote + stepID: 3 sealed: false style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} @@ -1649,12 +1657,14 @@ pages: buttons: - enabled: true label: Send this Quote via email to the primary contact - resourceType: compose:record - script: /client-scripts/compose/crm/Quote/SendToPriContact.js:default + resourceType: compose:record, + workflow: CRM-Quote-SendToPriContact + stepID: 3 - enabled: true label: Send this Quote to a custom email resourceType: compose:record - script: /client-scripts/compose/crm/Quote/SendToCustomEmail.js:default + workflow: CRM-Quote-SendToCustomEmail + stepID: 3 sealed: false style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} @@ -3787,15 +3797,18 @@ pages: - enabled: true label: Set Case status to Working resourceType: compose:record - script: /client-scripts/compose/crm/Case/SetStatusToWorking.js:default + workflow: CRM-Case-SetStatusToWorking + stepID: 21 - enabled: true label: Set Case status to Closed resourceType: compose:record - script: /client-scripts/compose/crm/Case/SetStatusToClosed.js:default + workflow: CRM-Case-SetStatusToClosed + stepID: 3 - enabled: true label: Inform the contact via email of the Case solution resourceType: compose:record - script: /client-scripts/compose/crm/Case/InformContact.js:default + workflow: CRM-Case-InformContact + stepID: 14 sealed: false style: variants: {border: primary, headerText: primary} diff --git a/provision/700_crm/1600_workflows.yaml b/provision/700_crm/1600_workflows.yaml new file mode 100644 index 000000000..606d84eda --- /dev/null +++ b/provision/700_crm/1600_workflows.yaml @@ -0,0 +1,14175 @@ +workflows: + CRM-Contact-SetLabel: + meta: + name: CRM - Contact - Set Label + description: Set label for contact record + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 23 + meta: + visual: + edges: + - childID: "23" + meta: + description: "" + label: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Create Contact + xywh: + - 2080 + - 2280 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: module + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 23 + meta: + visual: + edges: + - childID: "23" + meta: + description: "" + label: "" + visual: + id: "40" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: Update Contact + xywh: + - 2080 + - 2440 + - 200 + - 80 + steps: + - id: 23 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + value: Check if First/Last name exists + xywh: + - 2360 + - 2280 + - 200 + - 80 + labels: {} + - id: 41 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.FirstName + ' ' + record.values.LastName + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + value: Assign record.values.RecordLabel + xywh: + - 2840 + - 2120 + - 200 + - 80 + labels: {} + - id: 43 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.FirstName + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + value: Assign record.values.RecordLabel + xywh: + - 2840 + - 2280 + - 200 + - 80 + labels: {} + - id: 45 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.LastName + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "45" + parent: "1" + value: Assign record.values.RecordLabel + xywh: + - 2840 + - 2440 + - 200 + - 80 + labels: {} + - id: 74 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "74" + parent: "1" + value: Check if related Account exists + xywh: + - 3160 + - 2280 + - 200 + - 80 + labels: {} + - id: 76 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + value: null + xywh: + - 3560 + - 2280 + - 200 + - 80 + labels: {} + - id: 78 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.AccountId + value: null + type: ID + tests: [] + results: + - target: accountRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "78" + parent: "1" + value: Get related Account + xywh: + - 3160 + - 2440 + - 200 + - 80 + labels: {} + - id: 85 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "85" + parent: "1" + value: If related Account has AccountName + xywh: + - 3160 + - 2600 + - 200 + - 80 + labels: {} + - id: 86 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.RecordLabel + " (" + accountRecord.values.AccountName +")" + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "86" + parent: "1" + value: Add AccountName to RecordLabel + xywh: + - 3160 + - 2760 + - 200 + - 80 + labels: {} + paths: + - expr: '(record.values.FirstName ? true : false) && (record.values.LastName ? true : false)' + parentid: 23 + childid: 41 + meta: + name: "" + description: "" + visual: + id: "42" + parent: "1" + points: [] + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - FirstName & LastName' + - expr: 'record.values.FirstName ? true : false' + parentid: 23 + childid: 43 + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + points: + - x: 2712 + "y": 2320 + - x: 2712 + "y": 2320 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Only FirstName ' + - expr: 'record.values.LastName ? true : false' + parentid: 23 + childid: 45 + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#3 - Only LastName' + - expr: '(record.values.AccountId ? true : false)' + parentid: 74 + childid: 78 + meta: + name: "" + description: "" + visual: + id: "79" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 74 + childid: 76 + meta: + name: "" + description: "" + visual: + id: "80" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: '(accountRecord.values.AccountName ? true : false)' + parentid: 85 + childid: 86 + meta: + name: "" + description: "" + visual: + id: "87" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 85 + childid: 76 + meta: + name: "" + description: "" + visual: + id: "89" + parent: "1" + points: + - x: 3660 + "y": 2640 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 41 + childid: 74 + meta: + name: "" + description: "" + visual: + id: "90" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 43 + childid: 74 + meta: + name: "" + description: "" + visual: + id: "91" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 45 + childid: 74 + meta: + name: "" + description: "" + visual: + id: "92" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 78 + childid: 85 + meta: + name: "" + description: "" + visual: + id: "93" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Case-InformContact: + meta: + name: CRM - Case - Inform Contact + description: Inform the contact via email of the Case solution + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module.name + op: = + values: + - Case + - name: namespace.name + op: = + values: + - crm + enabled: true + stepID: 21 + meta: + visual: + edges: + - childID: "21" + meta: + description: "" + label: "" + visual: + id: "22" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Manual + xywh: + - 2480 + - 2760 + - 200 + - 80 + steps: + - id: 13 + kind: function + ref: emailSend + arguments: + - target: subject + source: "" + expr: '"Corteza - Case:" + record.values.CaseNumber + " - " + record.values.Subject' + value: null + type: String + tests: [] + - target: to + source: "" + expr: record.values.SuppliedEmail + value: null + type: String + tests: [] + - target: html + source: "" + expr: emailRow1 + emailRow2 + emailRow3 + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Send Email + xywh: + - 3360 + - 2760 + - 200 + - 80 + labels: {} + - id: 17 + kind: expressions + ref: "" + arguments: + - target: emailRow1 + source: "" + expr: '"

Solution of case: " + record.values.CaseNumber + " - " + record.values.Subject + "
"' + value: null + type: String + tests: [] + - target: emailRow2 + source: "" + expr: '"Solution Title: " + (record.values.SolutionName ? record.values.SolutionName : "/") + "
"' + value: null + type: String + tests: [] + - target: emailRow3 + source: "" + expr: '"Solution Details: " + (record.values.SolutionNote? record.values.SolutionNote: "/") + "
"' + value: null + type: Any + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + value: Prepare Email body + xywh: + - 3120 + - 2760 + - 200 + - 80 + labels: {} + - id: 20 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: You can only inform the client of a solution when the case status is "Closed". + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: 'Warning: Not Closed' + xywh: + - 2720 + - 2600 + - 200 + - 80 + labels: {} + - id: 21 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Check if Closed and has Email + xywh: + - 2720 + - 2760 + - 200 + - 80 + labels: {} + - id: 24 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: There is no supplied email. Please fill in an email address in the "Contact Email" field + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "24" + parent: "1" + value: 'Warning: No Email' + xywh: + - 2720 + - 2920 + - 200 + - 80 + labels: {} + - id: 27 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The case solution has been sent via email + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "27" + parent: "1" + value: Success + xywh: + - 3600 + - 2760 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 17 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: record.values.Status != "Closed" + parentid: 21 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + points: [] + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: '#1 - If Status not "Closed"' + - expr: 'record.values.SuppliedEmail ? false : true' + parentid: 21 + childid: 24 + meta: + name: "" + description: "" + visual: + id: "25" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - If no SuppliedEmail' + - expr: "" + parentid: 21 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#3 - Else' + - expr: "" + parentid: 13 + childid: 27 + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Solution-InsertNumber: + meta: + name: CRM - Solution - Insert Number + description: Sets the solution number based on the settings + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module.handle + op: = + values: + - Solution + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Solution Before Create Solution + xywh: + - 2040 + - 2080 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: namespace.handle + op: = + values: + - crm + - name: module.handle + op: = + values: + - Solution + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "9" + id: "9" + parent: "1" + value: Solution Before Update Solution + xywh: + - 2040 + - 2240 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Get Settings + xywh: + - 2320 + - 2080 + - 200 + - 80 + labels: {} + - id: 5 + kind: expressions + ref: "" + arguments: + - target: nextSolutionNumber + source: "" + expr: 'settings.values.SolutionNextNumber ? settings.values.SolutionNextNumber : 0' + value: null + type: Integer + tests: [] + - target: record.values.SolutionNumber + source: "" + expr: nextSolutionNumber + value: null + type: Integer + tests: [] + - target: settings.values.SolutionNextNumber + source: "" + expr: nextSolutionNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set SolutionNumber + xywh: + - 2960 + - 2080 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Save Settings + xywh: + - 2960 + - 2240 + - 200 + - 80 + labels: {} + - id: 11 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Check if has number + xywh: + - 2560 + - 2080 + - 200 + - 80 + labels: {} + - id: 14 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: End + xywh: + - 2560 + - 2240 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 5 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: 'record.values.SolutionNumber ? false : true' + parentid: 11 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - No Number' + - expr: "" + parentid: 3 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Has number' + CRM-Account-CreateNewOpportunity: + meta: + name: CRM - Account - Create New Opportunity + description: Creates new Opportunity record from an existing Account + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module.handle + op: = + values: + - Account + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "34" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: On Manual Account + xywh: + - 2120 + - 2080 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Get Settings + xywh: + - 2400 + - 2080 + - 200 + - 80 + labels: {} + - id: 55 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: query + source: "" + expr: '"AccountId = " + record.recordID + " AND IsPrimary"' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: contacts + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfContacts + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "55" + parent: "1" + value: Get Contacts + xywh: + - 2400 + - 2200 + - 200 + - 80 + labels: {} + - id: 61 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "61" + parent: "1" + value: Check for contact + xywh: + - 2400 + - 2320 + - 200 + - 80 + labels: {} + - id: 66 + kind: expressions + ref: "" + arguments: + - target: contact + source: "" + expr: contacts[0] + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Set contact + xywh: + - 2400 + - 2480 + - 200 + - 80 + labels: {} + - id: 81 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Opportunity + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: opportunity + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "81" + parent: "1" + value: Make Opportunity + xywh: + - 2680 + - 2080 + - 200 + - 80 + labels: {} + - id: 83 + kind: expressions + ref: "" + arguments: + - target: opportunity.values.Name + source: "" + expr: '"(unnamed)"' + value: null + type: String + tests: [] + - target: opportunity.values.AccountId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: opportunity.values.IsClosed + source: "" + expr: "false" + value: null + type: Boolean + tests: [] + - target: opportunity.values.IsWon + source: "" + expr: "false" + value: null + type: Boolean + tests: [] + - target: opportunity.values.CloseDate + source: "" + expr: modMonth(now(), 1) + value: null + type: DateTime + tests: [] + - target: opportunity.values.Probability + source: "" + expr: settings.values.OpportunityProbability + value: null + type: Integer + tests: [] + - target: opportunity.values.ForecastCategory + source: "" + expr: settings.values.OpportunityForecaseCategory + value: null + type: String + tests: [] + - target: opportunity.values.StageName + source: "" + expr: settings.values.OpportunityStagename + value: null + type: String + tests: [] + - target: opportunity.values.OwnerId + source: "" + expr: opportunity.values.OwnerId + value: null + type: ID + tests: [] + - target: opportunity.values.CampaignId + source: "" + expr: 'record.values.CampaignId ? record.values.CampaignId : []' + value: null + type: Array + tests: [] + - target: opportunity.values.LeadSource + source: "" + expr: record.values.AccountSource + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "83" + parent: "1" + value: Set Opportunity values + xywh: + - 2680 + - 2200 + - 200 + - 80 + labels: {} + - id: 86 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: opportunity + value: null + type: ComposeRecord + tests: [] + results: + - target: opportunity + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "86" + parent: "1" + value: Save Opportunity + xywh: + - 2680 + - 2320 + - 200 + - 80 + labels: {} + - id: 88 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: OpportunityContactRole + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: opportunityContactRole + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "88" + parent: "1" + value: Make OpportunityContactRole + xywh: + - 2960 + - 2080 + - 200 + - 80 + labels: {} + - id: 89 + kind: expressions + ref: "" + arguments: + - target: opportunityContactRole.values.ContactId + source: "" + expr: contact.recordID + value: null + type: ID + tests: [] + - target: opportunityContactRole.values.OpportunityId + source: "" + expr: opportunity.recordID + value: null + type: ID + tests: [] + - target: opportunityContactRole.values.IsPrimary + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "89" + parent: "1" + value: Set OpportunityContactRolevalues + xywh: + - 2960 + - 2192 + - 200 + - 80 + labels: {} + - id: 91 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: opportunity + value: null + type: ComposeRecord + tests: [] + results: + - target: opportunity + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "91" + parent: "1" + value: Save OpportunityContactRole + xywh: + - 2960 + - 2320 + - 200 + - 80 + labels: {} + - id: 103 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: '"Success"' + value: null + type: String + tests: [] + - target: message + source: "" + expr: '"The new opportunity has been created."' + value: null + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + - target: sticky + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "103" + parent: "1" + value: Show success + xywh: + - 3240 + - 2080 + - 200 + - 80 + labels: {} + - id: 105 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Opportunity + type: Handle + tests: [] + - target: namespace + source: "" + expr: crm + value: null + type: Handle + tests: [] + - target: record + source: "" + expr: opportunity + value: null + type: ComposeRecord + tests: [] + - target: edit + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "105" + parent: "1" + value: Go to editor + xywh: + - 3240 + - 2200 + - 200 + - 80 + labels: {} + - id: 107 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: '"Warning"' + value: null + type: String + tests: [] + - target: message + source: "" + expr: '"The primary contact is not defined"' + value: null + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + - target: sticky + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "107" + parent: "1" + value: Show warning + xywh: + - 2120 + - 2480 + - 200 + - 80 + labels: {} + paths: + - expr: numOfContacts > 0 + parentid: 61 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has contact' + - expr: "" + parentid: 66 + childid: 81 + meta: + name: "" + description: "" + visual: + id: "85" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 88 + childid: 89 + meta: + name: "" + description: "" + visual: + id: "90" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 89 + childid: 91 + meta: + name: "" + description: "" + visual: + id: "92" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 86 + childid: 88 + meta: + name: "" + description: "" + visual: + id: "93" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 91 + childid: 103 + meta: + name: "" + description: "" + visual: + id: "104" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 61 + childid: 107 + meta: + name: "" + description: "" + visual: + id: "108" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - No Contact' + - expr: "" + parentid: 103 + childid: 105 + meta: + name: "" + description: "" + visual: + id: "109" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 83 + childid: 86 + meta: + name: "" + description: "" + visual: + id: "112" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 81 + childid: 83 + meta: + name: "" + description: "" + visual: + id: "116" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 3 + childid: 55 + meta: + name: "" + description: "" + visual: + id: "117" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 55 + childid: 61 + meta: + name: "" + description: "" + visual: + id: "120" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Case-SetStatusToClosed: + meta: + name: CRM - Case - Set Status To Closed + description: Sets status of Case record to "Closed" + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module.handle + op: = + values: + - Case + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "58" + parent: "19" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "19" + value: On Manual Case + xywh: + - 80 + - 40 + - 200 + - 80 + steps: + - id: 3 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "19" + value: Check if Case Closed + xywh: + - 360 + - 40 + - 200 + - 80 + labels: {} + - id: 7 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "19" + value: Check for Solution + xywh: + - 760 + - 40 + - 200 + - 80 + labels: {} + - id: 11 + kind: expressions + ref: "" + arguments: + - target: record.values.ClosedDate + source: "" + expr: now() + value: null + type: DateTime + tests: [] + - target: record.values.Status + source: "" + expr: '"Closed"' + value: null + type: String + tests: [] + - target: record.values.IsClosed + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "19" + value: Update status + xywh: + - 1160 + - 40 + - 200 + - 80 + labels: {} + - id: 13 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: CaseUpdate + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: caseUpdate + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "19" + value: Make Update + xywh: + - 1160 + - 200 + - 200 + - 80 + labels: {} + - id: 15 + kind: expressions + ref: "" + arguments: + - target: caseUpdate.values.Description + source: "" + expr: '"State set to \"Closed\""' + value: null + type: String + tests: [] + - target: caseUpdate.values.Type + source: "" + expr: '"State change"' + value: null + type: String + tests: [] + - target: caseUpdate.values.CaseId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "19" + value: Set Update values + xywh: + - 1440 + - 40 + - 200 + - 80 + labels: {} + - id: 17 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: caseUpdate + value: null + type: ComposeRecord + tests: [] + results: + - target: caseUpdate + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "19" + value: Save Update + xywh: + - 1440 + - 200 + - 200 + - 80 + labels: {} + - id: 19 + kind: visual + ref: swimlane + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + value: Prepare and create Case Update + xywh: + - 1960 + - 1920 + - 1680 + - 320 + labels: {} + - id: 20 + kind: visual + ref: swimlane + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Handle Existing Solution + xywh: + - 1960 + - 2320 + - 1440 + - 320 + labels: {} + - id: 21 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "20" + value: Check for Solution + xywh: + - 80 + - 40 + - 200 + - 80 + labels: {} + - id: 23 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Solution + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.SolutionId + value: null + type: ID + tests: [] + results: + - target: solution + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "23" + parent: "20" + value: Get Solution + xywh: + - 80 + - 200 + - 200 + - 80 + labels: {} + - id: 26 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: Check SubmitAsSolution + xywh: + - 2600 + - 2360 + - 200 + - 80 + labels: {} + - id: 28 + kind: expressions + ref: "" + arguments: + - target: record.values.SolutionName + source: "" + expr: solution.values.SolutionName + value: null + type: String + tests: [] + - target: record.values.SolutionNote + source: "" + expr: solution.values.SolutionNote + value: null + type: String + tests: [] + - target: record.values.SolutionFile + source: "" + expr: solution.values.File + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "28" + parent: "20" + value: Update record + xywh: + - 360 + - 200 + - 200 + - 80 + labels: {} + - id: 30 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: + - target: record + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "30" + parent: "1" + value: Save record + xywh: + - 2600 + - 2520 + - 200 + - 80 + labels: {} + - id: 34 + kind: visual + ref: swimlane + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "34" + parent: "1" + value: Create Solution + xywh: + - 1960 + - 2720 + - 1440 + - 160 + labels: {} + - id: 35 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "35" + parent: "1" + value: Get Settings + xywh: + - 3160 + - 2360 + - 200 + - 80 + labels: {} + - id: 38 + kind: expressions + ref: "" + arguments: + - target: nextSolutionNumber + source: "" + expr: 'settings.values.SolutionNextNumber ? settings.values.SolutionNextNumber : 0' + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "38" + parent: "20" + value: Set nextSolutionNumber + xywh: + - 1200 + - 200 + - 200 + - 80 + labels: {} + - id: 40 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Solution + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: solution + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "40" + parent: "34" + value: Make Solution + xywh: + - 80 + - 40 + - 200 + - 80 + labels: {} + - id: 42 + kind: expressions + ref: "" + arguments: + - target: solution.values.SolutionName + source: "" + expr: record.values.SolutionName + value: null + type: String + tests: [] + - target: solution.values.SolutionNote + source: "" + expr: record.values.SolutionNote + value: null + type: String + tests: [] + - target: solution.values.File + source: "" + expr: record.values.SolutionFile + value: null + type: ID + tests: [] + - target: solution.values.Status + source: "" + expr: '"New"' + value: null + type: String + tests: [] + - target: solution.values.IsPublished + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + - target: solution.values.CaseId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: solution.values.SolutionNumber + source: "" + expr: nextSolutionNumber + value: null + type: Integer + tests: [] + - target: solution.values.ProductId + source: "" + expr: record.values.ProductId + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "42" + parent: "34" + value: Set Solution Values + xywh: + - 360 + - 40 + - 200 + - 80 + labels: {} + - id: 44 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: solution + value: null + type: ComposeRecord + tests: [] + results: + - target: solution + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "44" + parent: "34" + value: Save Solution + xywh: + - 640 + - 40 + - 200 + - 80 + labels: {} + - id: 46 + kind: expressions + ref: "" + arguments: + - target: settings.values.SolutionNextNumber + source: "" + expr: settings.values.SolutionNextNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "46" + parent: "34" + value: Set SolutionNextNumber + xywh: + - 920 + - 40 + - 200 + - 80 + labels: {} + - id: 48 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "48" + parent: "34" + value: Save Settings + xywh: + - 1200 + - 40 + - 200 + - 80 + labels: {} + - id: 51 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: This case is already closed + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "51" + parent: "19" + value: 'Warning: This case is already closed' + xywh: + - 360 + - 200 + - 200 + - 80 + labels: {} + - id: 62 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Unable to close the case. Please add a solution name or select an existing solution before closing the case + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "62" + parent: "19" + value: 'Warning: Unable to close the case. Please add a solution name or select an existing solution before closing the case.' + xywh: + - 760 + - 200 + - 200 + - 80 + labels: {} + - id: 63 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "63" + parent: "20" + value: Refresh page + xywh: + - 920 + - 200 + - 200 + - 80 + labels: {} + paths: + - expr: record.values.Status == "Closed" + parentid: 3 + childid: 51 + meta: + name: "" + description: "" + visual: + id: "6" + parent: "19" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Yes' + - expr: "" + parentid: 3 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "19" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No' + - expr: '(record.values.SolutionName ? false : true) && (record.values.SolutionId ? false : true) && (record.values.SubmitAsSolution ? false : true)' + parentid: 7 + childid: 62 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "19" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - No' + - expr: "" + parentid: 7 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "19" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Yes' + - expr: "" + parentid: 11 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "19" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 13 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "16" + parent: "19" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 15 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "18" + parent: "19" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 17 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "22" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: record.values.SolutionId + parentid: 21 + childid: 23 + meta: + name: "" + description: "" + visual: + id: "24" + parent: "20" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has Solution' + - expr: "" + parentid: 21 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "27" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 23 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "20" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 28 + childid: 30 + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: 'record.values.SubmitAsSolution ? true : false' + parentid: 26 + childid: 35 + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 26 + childid: 30 + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 35 + childid: 38 + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 38 + childid: 40 + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 40 + childid: 42 + meta: + name: "" + description: "" + visual: + id: "43" + parent: "34" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 42 + childid: 44 + meta: + name: "" + description: "" + visual: + id: "45" + parent: "34" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 44 + childid: 46 + meta: + name: "" + description: "" + visual: + id: "47" + parent: "34" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 46 + childid: 48 + meta: + name: "" + description: "" + visual: + id: "49" + parent: "34" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 48 + childid: 30 + meta: + name: "" + description: "" + visual: + id: "50" + parent: "1" + points: + - x: 3260 + "y": 2704 + - x: 2700 + "y": 2704 + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 30 + childid: 63 + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Quote-SendToPriContact: + meta: + name: CRM - Quote - Send To Pri Contact + description: Send this Quote via email to the primary contact + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module.handle + op: = + values: + - Quote + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: On Manual Quote + xywh: + - 2040 + - 2040 + - 200 + - 80 + steps: + - id: 3 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Check recipient + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + - id: 6 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: QuoteLineItem + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: query + source: "" + expr: '"QuoteId = " + record.recordID' + value: null + type: String + tests: [] + results: + - target: lineItems + source: "" + expr: records + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + value: Get LineItems + xywh: + - 2680 + - 2040 + - 200 + - 80 + labels: {} + - id: 11 + kind: function + ref: emailSend + arguments: + - target: subject + source: "" + expr: '"Corteza - Quote: " + record.values.QuoteNumber + " - " + record.values.Name' + value: null + type: String + tests: [] + - target: to + source: "" + expr: '"a@m"' + value: null + type: String + tests: [] + - target: html + source: "" + expr: html.document + value: null + type: Reader + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Send Mail + xywh: + - 2960 + - 2360 + - 200 + - 80 + labels: {} + - id: 15 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: There is no email linked to the quote. Please fill in an email address in the "Primary contact data" block + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + value: 'Warning: There is no email linked to the quote. Please fill in an email address in the "Primary contact data" block.' + xywh: + - 2320 + - 2200 + - 200 + - 80 + labels: {} + - id: 16 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The quote has been sent via email + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: 'Success: The quote has been sent via email' + xywh: + - 2960 + - 2520 + - 200 + - 80 + labels: {} + - id: 19 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: "" + value: quote + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: body + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/html + type: String + tests: [] + - target: variables + source: "" + expr: renderVariables + value: null + type: Vars + tests: [] + results: + - target: html + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + value: Quote to HTML + xywh: + - 2960 + - 2200 + - 200 + - 80 + labels: {} + - id: 31 + kind: expressions + ref: "" + arguments: + - target: renderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: renderVariables.quote + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + - target: renderVariables.lineItems + source: "" + expr: lineItems + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + value: Set Render Variables + xywh: + - 2960 + - 2040 + - 200 + - 80 + labels: {} + paths: + - expr: 'record.values.Email ? true : false' + parentid: 3 + childid: 6 + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - Yes' + - expr: "" + parentid: 3 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - No' + - expr: "" + parentid: 11 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 19 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 6 + childid: 31 + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 31 + childid: 19 + meta: + name: "" + description: "" + visual: + id: "47" + parent: "1" + points: null + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Quote-SendToCustomEmail: + meta: + name: CRM - Quote - Send To Custom Email + description: Sends quote email to custom address + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: namespace.handle + op: = + values: + - crm + - name: module.handle + op: = + values: + - Quote + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: On Manual Quote + xywh: + - 2040 + - 2040 + - 200 + - 80 + steps: + - id: 3 + kind: prompt + ref: input + arguments: + - target: title + source: "" + expr: "" + value: Input Custom Email + type: String + tests: [] + - target: message + source: "" + expr: "" + value: 'Please enter an email to send this quote to:' + type: String + tests: [] + - target: label + source: "" + expr: '"Email"' + value: null + type: String + tests: [] + - target: type + source: "" + expr: "" + value: email + type: String + tests: [] + results: + - target: email + source: "" + expr: value + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Prompt for Email + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + - id: 5 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Check if email entered + xywh: + - 2600 + - 2040 + - 200 + - 80 + labels: {} + - id: 8 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: QuoteLineItem + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: query + source: "" + expr: '"QuoteId = " + record.recordID' + value: null + type: String + tests: [] + results: + - target: lineItems + source: "" + expr: records + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + value: Get LineItems + xywh: + - 2960 + - 2040 + - 200 + - 80 + labels: {} + - id: 13 + kind: function + ref: emailSend + arguments: + - target: subject + source: "" + expr: '"Corteza - Quote: " + record.values.QuoteNumber + " - " + record.values.Name' + value: null + type: String + tests: [] + - target: to + source: "" + expr: email + value: null + type: String + tests: [] + - target: html + source: "" + expr: html.document + value: null + type: Reader + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Send Email + xywh: + - 3240 + - 2360 + - 200 + - 80 + labels: {} + - id: 19 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Please enter an email to send this quote to + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + value: 'Warning: Please enter an email to send this quote to' + xywh: + - 2600 + - 2200 + - 200 + - 80 + labels: {} + - id: 20 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The quote has been sent via email + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: 'Success: The quote has been sent via email' + xywh: + - 3240 + - 2520 + - 200 + - 80 + labels: {} + - id: 29 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: "" + value: quote + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: body + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/html + type: String + tests: [] + - target: variables + source: "" + expr: renderVariables + value: null + type: Vars + tests: [] + results: + - target: html + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + value: Render Template + xywh: + - 3240 + - 2200 + - 200 + - 80 + labels: {} + - id: 33 + kind: expressions + ref: "" + arguments: + - target: renderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: renderVariables.quote + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + - target: renderVariables.lineItems + source: "" + expr: lineItems + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + value: Set Render Variables + xywh: + - 3240 + - 2040 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: 'email ? true : false' + parentid: 5 + childid: 8 + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 5 + childid: 19 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 13 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 29 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "32" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 33 + childid: 29 + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 8 + childid: 33 + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + points: null + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Quote-InsertNumber: + meta: + name: CRM - Quote - Insert Number + description: Sets the Quote number based on the settings + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module.handle + op: = + values: + - Quote + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Quote Before Create Quote + xywh: + - 2040 + - 2080 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: namespace.handle + op: = + values: + - crm + - name: module.handle + op: = + values: + - Quote + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "9" + id: "9" + parent: "1" + value: Quote Before Update Quote + xywh: + - 2040 + - 2240 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Get Settings + xywh: + - 2320 + - 2080 + - 200 + - 80 + labels: {} + - id: 5 + kind: expressions + ref: "" + arguments: + - target: nextQuoteNumber + source: "" + expr: 'settings.values.QuoteNextNumber ? settings.values.QuoteNextNumber : 0' + value: null + type: Integer + tests: [] + - target: record.values.QuoteNumber + source: "" + expr: nextQuoteNumber + value: null + type: Integer + tests: [] + - target: settings.values.QuoteNextNumber + source: "" + expr: nextQuoteNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set QuoteNumber + xywh: + - 2960 + - 2080 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Save Settings + xywh: + - 2960 + - 2240 + - 200 + - 80 + labels: {} + - id: 11 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Check if has number + xywh: + - 2560 + - 2080 + - 200 + - 80 + labels: {} + - id: 14 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: End + xywh: + - 2560 + - 2240 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 5 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: 'record.values.QuoteNumber ? false : true' + parentid: 11 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - No Number' + - expr: "" + parentid: 3 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Has number' + CRM-Opportunity-ApplyPriceBook: + meta: + name: CRM - Opportunity - Apply Price Book + description: Update prices of Products by applying the selected Price Book and inserted discounts + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module.handle + op: = + values: + - Opportunity + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: On Manual Opportunity + xywh: + - 2040 + - 2040 + - 200 + - 80 + steps: + - id: 3 + kind: expressions + ref: "" + arguments: + - target: pricebookId + source: "" + expr: 'record.values.PricebookId ? record.values.PricebookId : 0' + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Set pricebookId + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + - id: 5 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Pricebook + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: query + source: "" + expr: '"IsActive AND IsStandard"' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: pricebooks + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfPricebooks + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Fetch Pricebooks + xywh: + - 3040 + - 2040 + - 200 + - 80 + labels: {} + - id: 7 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Check Pricebooks + xywh: + - 3320 + - 2040 + - 200 + - 80 + labels: {} + - id: 10 + kind: expressions + ref: "" + arguments: + - target: pricebook + source: "" + expr: 'pricebooks[0] ? pricebooks[0] : undefined' + value: null + type: ComposeRecord + tests: [] + - target: pricebookId + source: "" + expr: 'pricebook ? pricebook.recordID : undefined' + value: null + type: ID + tests: [] + - target: record.values.PricebookId + source: "" + expr: pricebookId + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + value: Set pricebookIds + xywh: + - 3040 + - 2200 + - 200 + - 80 + labels: {} + - id: 12 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: '"There are no active price books configured in the CRM. Please insert an active price book in the Price book module"' + value: null + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + value: 'Warning: No Pricebooks' + xywh: + - 3760 + - 2040 + - 200 + - 80 + labels: {} + - id: 14 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Check pricebookId + xywh: + - 2600 + - 2400 + - 200 + - 80 + labels: {} + - id: 17 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Please select a Price book for this opportunity first. + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + value: 'Warning: No Pricebook' + xywh: + - 3320 + - 2400 + - 200 + - 80 + labels: {} + - id: 20 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: + - target: record + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Save Opportunity + xywh: + - 3320 + - 2200 + - 200 + - 80 + labels: {} + - id: 23 + kind: iterator + ref: composeRecordsEach + arguments: + - target: module + source: "" + expr: "" + value: OpportunityLineItem + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: query + source: "" + expr: '"OpportunityId = " + record.recordID' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: lineItem + source: "" + expr: record + value: null + type: "" + tests: [] + - target: index + source: "" + expr: index + value: null + type: "" + tests: [] + - target: numOfLineItems + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + value: Fetch LineItems + xywh: + - 2320 + - 2560 + - 200 + - 80 + labels: {} + - id: 26 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Product + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: "" + expr: lineItem.values.ProductId + value: null + type: ID + tests: [] + results: + - target: product + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: Fetch Product + xywh: + - 2880 + - 2560 + - 200 + - 80 + labels: {} + - id: 28 + kind: expressions + ref: "" + arguments: + - target: quoteTotal + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + value: Set Quote Total + xywh: + - 2040 + - 2560 + - 200 + - 80 + labels: {} + - id: 30 + kind: expressions + ref: "" + arguments: + - target: record.values.Amount + source: "" + expr: quoteTotal + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "30" + parent: "1" + value: Set Amount + xywh: + - 2040 + - 2720 + - 200 + - 80 + labels: {} + - id: 32 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: + - target: record + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "32" + parent: "1" + value: Save Opportunity + xywh: + - 2320 + - 2720 + - 200 + - 80 + labels: {} + - id: 34 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Pricebook applied + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "34" + parent: "1" + value: 'Success: Pricebook applied' + xywh: + - 2040 + - 2880 + - 200 + - 80 + labels: {} + - id: 36 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Opportunity + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + value: Reload page + xywh: + - 2320 + - 2880 + - 200 + - 80 + labels: {} + - id: 38 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: PricebookEntry + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: query + source: "" + expr: '"PricebookId = " + pricebookId + " AND ProductId = " + lineItem.values.ProductId' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: pricebookEntries + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfPricebookEntries + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "38" + parent: "1" + value: Fetch Pricebook entry + xywh: + - 3320 + - 2560 + - 200 + - 80 + labels: {} + - id: 41 + kind: expressions + ref: "" + arguments: + - target: pricebookEntry + source: "" + expr: 'numOfPricebookEntries > 0 ? pricebookEntries[0] : undefined' + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + value: Set pricebookEntry + xywh: + - 2600 + - 2720 + - 200 + - 80 + labels: {} + - id: 45 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "45" + parent: "1" + value: null + xywh: + - 3560 + - 2720 + - 200 + - 80 + labels: {} + - id: 49 + kind: expressions + ref: "" + arguments: + - target: quantity + source: "" + expr: 'lineItem.values.Quantity ? lineItem.values.Quantity : 1' + value: null + type: Float + tests: [] + - target: discount + source: "" + expr: 'lineItem.values.Discount ? lineItem.values.Discount : 0' + value: null + type: Float + tests: [] + - target: listprice + source: "" + expr: 'pricebookEntry.values.UnitPrice ? pricebookEntry.values.UnitPrice : 0' + value: null + type: Float + tests: [] + - target: unitprice + source: "" + expr: '(lineItem.values.UnitPrice ? false : true) ? listprice : (lineItem.values.UnitPrice ? lineItem.values.UnitPrice : 0)' + value: null + type: Any + tests: [] + - target: subtotal + source: "" + expr: unitprice * quantity + value: null + type: Float + tests: [] + - target: totalprice + source: "" + expr: subtotal - discount + value: null + type: Float + tests: [] + - target: lineItem.values.Name + source: "" + expr: product.values.Name + value: null + type: String + tests: [] + - target: lineItem.values.ProductCode + source: "" + expr: product.values.ProductCode + value: null + type: String + tests: [] + - target: lineItem.values.ListPrice + source: "" + expr: listprice + value: null + type: Float + tests: [] + - target: lineItem.values.UnitPrice + source: "" + expr: unitprice + value: null + type: Float + tests: [] + - target: lineItem.values.Subtotal + source: "" + expr: subtotal + value: null + type: Float + tests: [] + - target: lineItem.values.TotalPrice + source: "" + expr: totalprice + value: null + type: Float + tests: [] + - target: quoteTotal + source: "" + expr: quoteTotal + totalprice + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "49" + parent: "1" + value: Set line item values + xywh: + - 2880 + - 2720 + - 200 + - 80 + labels: {} + - id: 51 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: lineItem + value: null + type: ComposeRecord + tests: [] + results: + - target: lineItem + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "51" + parent: "1" + value: Save lineItem + xywh: + - 3160 + - 2720 + - 200 + - 80 + labels: {} + - id: 53 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "53" + parent: "1" + value: Check pricebookId + xywh: + - 2600 + - 2040 + - 200 + - 80 + labels: {} + - id: 66 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Check numOfPricebookEntries > 0 + xywh: + - 3560 + - 2560 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 5 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: numOfPricebooks > 0 + parentid: 7 + childid: 10 + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has Pricebook' + - expr: "" + parentid: 7 + childid: 12 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No Pricebooks' + - expr: "" + parentid: 10 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: pricebookId != 0 + parentid: 14 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "24" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has Pricebook' + - expr: "" + parentid: 14 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "25" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No pricebook' + - expr: "" + parentid: 23 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "27" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Iterate over line items + - expr: "" + parentid: 28 + childid: 23 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 23 + childid: 30 + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 30 + childid: 32 + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 32 + childid: 34 + meta: + name: "" + description: "" + visual: + id: "35" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 34 + childid: 36 + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 26 + childid: 38 + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 49 + childid: 51 + meta: + name: "" + description: "" + visual: + id: "52" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: pricebookId != 0 + parentid: 53 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "56" + parent: "1" + points: + - x: 2700 + "y": 2200 + - x: 2000 + "y": 2200 + - x: 2000 + "y": 2600 + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - Has pricebookId' + - expr: "" + parentid: 20 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "57" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 53 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "58" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No pricebookId' + - expr: numOfPricebookEntries > 0 + parentid: 66 + childid: 41 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has pricebook entries' + - expr: "" + parentid: 66 + childid: 45 + meta: + name: "" + description: "" + visual: + id: "68" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No entry' + - expr: "" + parentid: 41 + childid: 49 + meta: + name: "" + description: "" + visual: + id: "70" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 38 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "82" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 3 + childid: 53 + meta: + name: "" + description: "" + visual: + id: "90" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Case-InsertNumber: + meta: + name: CRM - Case - Insert Number + description: This workflow assigns the case number based on the global settings record. + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module + op: = + values: + - Case + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Before Create Case + xywh: + - 2120 + - 2200 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: namespace.handle + op: = + values: + - crm + - name: module.handle + op: = + values: + - Case + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "20" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "19" + id: "19" + parent: "1" + value: Before Update Case + xywh: + - 2120 + - 2360 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.ID + value: null + type: ID + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Fetch settings + xywh: + - 2440 + - 2200 + - 200 + - 80 + labels: {} + - id: 16 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: Update settings + xywh: + - 3120 + - 2360 + - 200 + - 80 + labels: {} + - id: 21 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Check if has number + xywh: + - 2720 + - 2200 + - 200 + - 80 + labels: {} + - id: 24 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "24" + parent: "1" + value: End + xywh: + - 2720 + - 2360 + - 200 + - 80 + labels: {} + - id: 26 + kind: expressions + ref: "" + arguments: + - target: record.values.CaseNumber + source: "" + expr: 'settings.values.CaseNextNumber ? settings.values.CaseNextNumber: 0' + value: null + type: Integer + tests: [] + - target: settings.values.CaseNextNumber + source: "" + expr: record.values.CaseNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: Set number + xywh: + - 3120 + - 2200 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "22" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: 'record.values.CaseNumber ? false : true' + parentid: 21 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - No number' + - expr: "" + parentid: 21 + childid: 24 + meta: + name: "" + description: "" + visual: + id: "25" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Has number' + - expr: "" + parentid: 26 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "27" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Account-CreateNewCase: + meta: + name: CRM - Account - Create New Case + description: Creates new Case record from an existing Account + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module + op: = + values: + - Account + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 14 + meta: + visual: + edges: + - childID: "14" + meta: + description: "" + label: "" + visual: + id: "56" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: From Account + xywh: + - 2280 + - 2160 + - 200 + - 80 + steps: + - id: 14 + kind: iterator + ref: composeRecordsEach + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + - target: query + source: "" + expr: '"AccountId=" + record.recordID' + value: null + type: String + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Find primary contact + xywh: + - 2560 + - 2160 + - 200 + - 80 + labels: {} + - id: 17 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + value: Is primary contact? + xywh: + - 2960 + - 2160 + - 200 + - 80 + labels: {} + - id: 18 + kind: break + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + value: Found it! + xywh: + - 3584 + - 2160 + - 200 + - 80 + labels: {} + - id: 19 + kind: expressions + ref: "" + arguments: + - target: primaryContact + source: "" + expr: contact + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + value: Set primary contact + xywh: + - 3320 + - 2160 + - 200 + - 80 + labels: {} + - id: 20 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Keep looking + xywh: + - 2960 + - 2400 + - 200 + - 80 + labels: {} + - id: 28 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + value: Found primary contact? + xywh: + - 2560 + - 2600 + - 200 + - 80 + labels: {} + - id: 29 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The primary contact is not defined + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + value: No primary contact + xywh: + - 2560 + - 2760 + - 200 + - 80 + labels: {} + - id: 34 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: case + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "34" + parent: "1" + value: Prepare record + xywh: + - 3240 + - 2600 + - 200 + - 80 + labels: {} + - id: 36 + kind: expressions + ref: "" + arguments: + - target: case.values.Subject + source: "" + expr: '"(no subject)"' + value: null + type: String + tests: [] + - target: case.values.ContactId + source: "" + expr: primaryContact.recordID + value: null + type: ID + tests: [] + - target: case.values.AccountId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: case.values.Status + source: "" + expr: '"New"' + value: null + type: String + tests: [] + - target: case.values.Priority + source: "" + expr: '"Low"' + value: null + type: String + tests: [] + - target: case.values.SuppliedName + source: "" + expr: trim(format("%s %s", primaryContact.values.FirstName, primaryContact.values.LastName)) + value: null + type: String + tests: [] + - target: case.values.SuppliedEmail + source: "" + expr: primaryContact.values.Email + value: null + type: String + tests: [] + - target: case.values.SuppliedPhone + source: "" + expr: primaryContact.values.Phone + value: null + type: String + tests: [] + - target: case.values.OwnerId + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + - target: case.values.CaseNumber + source: "" + expr: nextCaseNumber + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + value: Set record values + xywh: + - 3240 + - 2760 + - 200 + - 80 + labels: {} + - id: 38 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: case + value: null + type: ComposeRecord + tests: [] + results: + - target: case + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "38" + parent: "1" + value: Create case + xywh: + - 3520 + - 2600 + - 200 + - 80 + labels: {} + - id: 40 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The new case has been created + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "40" + parent: "1" + value: Notify Case created + xywh: + - 3800 + - 2600 + - 200 + - 80 + labels: {} + - id: 42 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: record + source: "" + expr: case + value: null + type: ComposeRecord + tests: [] + - target: edit + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "42" + parent: "1" + value: Go to record editor + xywh: + - 3800 + - 2760 + - 200 + - 80 + labels: {} + - id: 44 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + value: Fetch settings + xywh: + - 2960 + - 2600 + - 200 + - 80 + labels: {} + - id: 45 + kind: expressions + ref: "" + arguments: + - target: nextCaseNumber + source: "" + expr: 'settings.values.CaseNextNumber ? settings.values.CaseNextNumber : 0' + value: null + type: Integer + tests: [] + - target: settings.values.CaseNextNumber + source: "" + expr: settings.values.CaseNextNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "45" + parent: "1" + value: Set nextCaseNumber + xywh: + - 2960 + - 2760 + - 200 + - 80 + labels: {} + - id: 50 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "50" + parent: "1" + value: Save settings + xywh: + - 3520 + - 2760 + - 200 + - 80 + labels: {} + paths: + - expr: contact.values.IsPrimary + parentid: 17 + childid: 19 + meta: + name: "" + description: "" + visual: + id: "24" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 17 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "25" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 19 + childid: 18 + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 14 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "27" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - Loop body' + - expr: 'primaryContact ? false : true' + parentid: 28 + childid: 29 + meta: + name: "" + description: "" + visual: + id: "30" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 14 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Loop end' + - expr: "" + parentid: 28 + childid: 44 + meta: + name: "" + description: "" + visual: + id: "35" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 34 + childid: 36 + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 36 + childid: 38 + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 40 + childid: 42 + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 44 + childid: 45 + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 45 + childid: 34 + meta: + name: "" + description: "" + visual: + id: "47" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 38 + childid: 50 + meta: + name: "" + description: "" + visual: + id: "51" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 50 + childid: 40 + meta: + name: "" + description: "" + visual: + id: "52" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Lead-ToAccount: + meta: + name: CRM - Lead - To Account + description: Converts Lead to Account record + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module + op: = + values: + - Lead + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "111" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: To Account + xywh: + - 2200 + - 2200 + - 200 + - 80 + steps: + - id: 3 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Already converted? + xywh: + - 2520 + - 2200 + - 200 + - 80 + labels: {} + - id: 5 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Info + type: String + tests: [] + - target: message + source: "" + expr: "" + value: This lead is already converted + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: info + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Lead already converted + xywh: + - 2888 + - 2200 + - 200 + - 80 + labels: {} + - id: 6 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: account + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + value: Prepare account record + xywh: + - 2528 + - 2400 + - 200 + - 80 + labels: {} + - id: 7 + kind: expressions + ref: "" + arguments: + - target: account.values.BillingStreet + source: "" + expr: record.values.Street + value: null + type: String + tests: [] + - target: account.values.BillingCity + source: "" + expr: record.values.City + value: null + type: String + tests: [] + - target: account.values.BillingState + source: "" + expr: record.values.State + value: null + type: String + tests: [] + - target: account.values.BillingPostalCode + source: "" + expr: record.values.PostalCode + value: null + type: String + tests: [] + - target: account.values.BillingCountry + source: "" + expr: record.values.Country + value: null + type: String + tests: [] + - target: account.values.ShippingStreet + source: "" + expr: record.values.Street + value: null + type: String + tests: [] + - target: account.values.ShippingCity + source: "" + expr: record.values.City + value: null + type: String + tests: [] + - target: account.values.ShippingState + source: "" + expr: record.values.State + value: null + type: String + tests: [] + - target: account.values.ShippingPostalCode + source: "" + expr: record.values.PostalCode + value: null + type: String + tests: [] + - target: account.values.ShippingCountry + source: "" + expr: record.values.Country + value: null + type: String + tests: [] + - target: account.values.AnnualRevenue + source: "" + expr: record.values.AnnualRevenue + value: null + type: String + tests: [] + - target: account.values.Description + source: "" + expr: record.values.Description + value: null + type: String + tests: [] + - target: account.values.AccountName + source: "" + expr: record.values.Company + value: null + type: String + tests: [] + - target: account.values.Fax + source: "" + expr: record.values.Fax + value: null + type: String + tests: [] + - target: account.values.Industry + source: "" + expr: record.values.Industry + value: null + type: String + tests: [] + - target: account.values.AccountSource + source: "" + expr: record.values.LeadSource + value: null + type: String + tests: [] + - target: account.values.Phone + source: "" + expr: record.values.Phone + value: null + type: String + tests: [] + - target: account.values.NumberOfEmployees + source: "" + expr: record.values.NumberOfEmployees + value: null + type: Integer + tests: [] + - target: account.values.Rating + source: "" + expr: record.values.Rating + value: null + type: String + tests: [] + - target: account.values.Website + source: "" + expr: record.values.Website + value: null + type: String + tests: [] + - target: account.values.Twitter + source: "" + expr: record.values.Twitter + value: null + type: String + tests: [] + - target: account.values.Facebook + source: "" + expr: record.values.Facebook + value: null + type: String + tests: [] + - target: account.values.LinkedIn + source: "" + expr: record.values.LinkedIn + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Populate account data + xywh: + - 2816 + - 2400 + - 200 + - 80 + labels: {} + - id: 8 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: account + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: account + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + value: Create account + xywh: + - 3080 + - 2400 + - 200 + - 80 + labels: {} + - id: 9 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Prepare contact record + xywh: + - 2544 + - 2584 + - 200 + - 80 + labels: {} + - id: 10 + kind: expressions + ref: "" + arguments: + - target: contact.values.MailingStreet + source: "" + expr: record.values.Street + value: null + type: String + tests: [] + - target: contact.values.MailingCity + source: "" + expr: record.values.City + value: null + type: String + tests: [] + - target: contact.values.MailingState + source: "" + expr: record.values.State + value: null + type: String + tests: [] + - target: contact.values.MailingPostalCode + source: "" + expr: record.values.PostalCode + value: null + type: String + tests: [] + - target: contact.values.MailingCountry + source: "" + expr: record.values.Country + value: null + type: String + tests: [] + - target: contact.values.Description + source: "" + expr: record.values.Description + value: null + type: String + tests: [] + - target: contact.values.DoNotCall + source: "" + expr: record.values.DoNotCall + value: null + type: Boolean + tests: [] + - target: contact.values.Email + source: "" + expr: record.values.Email + value: null + type: String + tests: [] + - target: contact.values.HasOptedOutOfEmail + source: "" + expr: record.values.HasOptedOutOfEmail + value: null + type: Boolean + tests: [] + - target: contact.values.Fax + source: "" + expr: record.values.Fax + value: null + type: String + tests: [] + - target: contact.values.HasOptedOutOfFax + source: "" + expr: record.values.HasOptedOutOfFax + value: null + type: Boolean + tests: [] + - target: contact.values.LeadSource + source: "" + expr: record.values.LeadSource + value: null + type: String + tests: [] + - target: contact.values.Twitter + source: "" + expr: record.values.Twitter + value: null + type: String + tests: [] + - target: contact.values.Facebook + source: "" + expr: record.values.Facebook + value: null + type: String + tests: [] + - target: contact.values.LinkedIn + source: "" + expr: record.values.LinkedIn + value: null + type: String + tests: [] + - target: contact.values.Salutation + source: "" + expr: record.values.Salutation + value: null + type: String + tests: [] + - target: contact.values.FirstName + source: "" + expr: record.values.FirstName + value: null + type: String + tests: [] + - target: contact.values.LastName + source: "" + expr: record.values.LastName + value: null + type: String + tests: [] + - target: contact.values.MobilePhone + source: "" + expr: record.values.MobilePhone + value: null + type: String + tests: [] + - target: contact.values.Phone + source: "" + expr: record.values.Phone + value: null + type: String + tests: [] + - target: contact.values.Title + source: "" + expr: record.values.Title + value: null + type: String + tests: [] + - target: contact.values.IsPrimary + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + - target: contact.values.CampaignId + source: "" + expr: record.values.CampaignId + value: null + type: Any + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + value: Populate contact data + xywh: + - 2800 + - 2584 + - 200 + - 80 + labels: {} + - id: 11 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: contact + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Create contact + xywh: + - 3064 + - 2584 + - 200 + - 80 + labels: {} + - id: 12 + kind: expressions + ref: "" + arguments: + - target: record.values.Status + source: "" + expr: '"Converted"' + value: null + type: String + tests: [] + - target: record.values.IsConverted + source: "" + expr: '"Yes"' + value: null + type: String + tests: [] + - target: record.values.ConvertedAccountId + source: "" + expr: account.recordID + value: null + type: ID + tests: [] + - target: record.values.ConvertedContactId + source: "" + expr: contact.recordID + value: null + type: ID + tests: [] + - target: record.values.ConvertedDate + source: "" + expr: account.createdAt + value: null + type: DateTime + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + value: Update lead data + xywh: + - 2560 + - 2760 + - 200 + - 80 + labels: {} + - id: 13 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: record + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: record + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Save lead + xywh: + - 2832 + - 2760 + - 200 + - 80 + labels: {} + - id: 17 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The lead has been converted + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + value: Lead converted + xywh: + - 2560 + - 3080 + - 200 + - 80 + labels: {} + - id: 79 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: "" + expr: account + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "79" + parent: "1" + value: Redirect to account page + xywh: + - 2840 + - 3080 + - 200 + - 80 + labels: {} + - id: 81 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: "" + value: lead_converted_content + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: body + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/html + type: String + tests: [] + - target: variables + source: "" + expr: contentRenderVariables + value: null + type: Vars + tests: [] + results: + - target: content + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "81" + parent: "1" + value: Prepare email content + xywh: + - 2840 + - 2920 + - 200 + - 80 + labels: {} + - id: 83 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: "" + value: lead_converted_subject + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: subject + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/plain + type: String + tests: [] + - target: variables + source: "" + expr: subjectRenderVariables + value: null + type: Vars + tests: [] + results: + - target: subject + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "83" + parent: "1" + value: Prepare email subject + xywh: + - 3120 + - 2920 + - 200 + - 80 + labels: {} + - id: 85 + kind: function + ref: emailSend + arguments: + - target: subject + source: "" + expr: subject.document + value: null + type: Reader + tests: [] + - target: to + source: "" + expr: owner + value: null + type: User + tests: [] + - target: html + source: "" + expr: content.document + value: null + type: Reader + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "85" + parent: "1" + value: Send email + xywh: + - 3680 + - 2920 + - 200 + - 80 + labels: {} + - id: 88 + kind: function + ref: usersLookup + arguments: + - target: lookup + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + results: + - target: owner + source: "" + expr: user + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "88" + parent: "1" + value: Get owner + xywh: + - 3400 + - 2920 + - 200 + - 80 + labels: {} + - id: 136 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "136" + parent: "1" + value: Has owner? + xywh: + - 3120 + - 2760 + - 200 + - 80 + labels: {} + - id: 139 + kind: expressions + ref: "" + arguments: + - target: subjectRenderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: subjectRenderVariables.account + source: "" + expr: account + value: null + type: ComposeRecord + tests: [] + - target: contentRenderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: contentRenderVariables.lead + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + - target: contentRenderVariables.account + source: "" + expr: account + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "139" + parent: "1" + value: Prepare render Vars + xywh: + - 2560 + - 2920 + - 200 + - 80 + labels: {} + paths: + - expr: record.values.Status == "Converted" + parentid: 3 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 3 + childid: 6 + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 6 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 9 + childid: 10 + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 10 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "27" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 17 + childid: 79 + meta: + name: "" + description: "" + visual: + id: "80" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 13 + childid: 136 + meta: + name: "" + description: "" + visual: + id: "82" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 81 + childid: 83 + meta: + name: "" + description: "" + visual: + id: "84" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 83 + childid: 88 + meta: + name: "" + description: "" + visual: + id: "86" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 85 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "87" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 88 + childid: 85 + meta: + name: "" + description: "" + visual: + id: "89" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 7 + childid: 8 + meta: + name: "" + description: "" + visual: + id: "107" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 8 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "108" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 12 + meta: + name: "" + description: "" + visual: + id: "109" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 12 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "110" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: record.values.OwnerId != 0 + parentid: 136 + childid: 139 + meta: + name: "" + description: "" + visual: + id: "137" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 136 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "138" + parent: "1" + points: + - x: 3960 + "y": 2800 + - x: 3960 + "y": 3040 + - x: 2520 + "y": 3040 + - x: 2520 + "y": 3120 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 139 + childid: 81 + meta: + name: "" + description: "" + visual: + id: "140" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Account-CreateNewContract: + meta: + name: CRM - Account - Create New Contract + description: Creates new Contract record from an existing Account + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module + op: = + values: + - Account + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "11" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Create new Contract + xywh: + - 2120 + - 2200 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Fetch settings + xywh: + - 2424 + - 2200 + - 200 + - 80 + labels: {} + - id: 4 + kind: expressions + ref: "" + arguments: + - target: nextContractNumber + source: "" + expr: 'settings.values.ContractNextNumber ? settings.values.ContractNextNumber : 0' + value: null + type: Integer + tests: [] + - target: contractDefaultTime + source: "" + expr: 'settings.values.ContractDefaultTime ? settings.values.ContractDefaultTime : 0' + value: null + type: Integer + tests: [] + - target: settings.values.ContractNextNumber + source: "" + expr: settings.values.ContractNextNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "4" + parent: "1" + value: Prepare setting values + xywh: + - 2680 + - 2200 + - 200 + - 80 + labels: {} + - id: 5 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Contract + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: contract + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Prepare contract record + xywh: + - 2392 + - 2360 + - 200 + - 80 + labels: {} + - id: 6 + kind: expressions + ref: "" + arguments: + - target: contract.values.AccountId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: contract.values.Status + source: "" + expr: '"Draft"' + value: null + type: String + tests: [] + - target: contract.values.BillingStreet + source: "" + expr: record.values.BillingStreet + value: null + type: String + tests: [] + - target: contract.values.BillingCity + source: "" + expr: record.values.BillingCity + value: null + type: String + tests: [] + - target: contract.values.BillingState + source: "" + expr: record.values.BillingState + value: null + type: String + tests: [] + - target: contract.values.BillingPostalCode + source: "" + expr: record.values.BillingPostalCode + value: null + type: String + tests: [] + - target: contract.values.BillingCountry + source: "" + expr: record.values.BillingCountry + value: null + type: String + tests: [] + - target: contract.values.ShippingStreet + source: "" + expr: record.values.BillingStreet + value: null + type: String + tests: [] + - target: contract.values.ShippingCity + source: "" + expr: record.values.BillingCity + value: null + type: String + tests: [] + - target: contract.values.ShippingState + source: "" + expr: record.values.BillingState + value: null + type: String + tests: [] + - target: contract.values.ShippingPostalCode + source: "" + expr: record.values.BillingPostalCode + value: null + type: String + tests: [] + - target: contract.values.ShippingCountry + source: "" + expr: record.values.BillingCountry + value: null + type: String + tests: [] + - target: contract.values.ContractTerm + source: "" + expr: contractDefaultTime + value: null + type: Integer + tests: [] + - target: contract.values.ContractNumber + source: "" + expr: nextContractNumber + value: null + type: Integer + tests: [] + - target: contract.values.OwnerId + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + value: Update contract data + xywh: + - 2648 + - 2360 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: contract + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: contract + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Save contract + xywh: + - 2920 + - 2360 + - 200 + - 80 + labels: {} + - id: 8 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: settings + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + value: Update settings + xywh: + - 2400 + - 2560 + - 200 + - 80 + labels: {} + - id: 9 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The new contract record has been created + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Notify user + xywh: + - 2400 + - 2720 + - 200 + - 80 + labels: {} + - id: 22 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Contract + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: "" + expr: contract + value: null + type: ComposeRecord + tests: [] + - target: edit + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "22" + parent: "1" + value: Redirect user + xywh: + - 2680 + - 2720 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 4 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 4 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 5 + childid: 6 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 6 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 7 + childid: 8 + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 8 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 9 + childid: 22 + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Case-SetStatusToWorking: + meta: + name: CRM - Case - Set Status To Working + description: Creates new Contract record from an existing Account + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module + op: = + values: + - Case + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 14 + meta: + visual: + edges: + - childID: "14" + meta: + description: "" + label: "" + visual: + id: "15" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Set case working + xywh: + - 2040 + - 2000 + - 200 + - 80 + steps: + - id: 3 + kind: expressions + ref: "" + arguments: + - target: record.values.Status + source: "" + expr: '"Working"' + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Set status + xywh: + - 2680 + - 2000 + - 200 + - 80 + labels: {} + - id: 4 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: + - target: record + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "4" + parent: "1" + value: Update case + xywh: + - 2680 + - 2200 + - 200 + - 80 + labels: {} + - id: 5 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: CaseUpdate + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: caseUpdate + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Prepare case update + xywh: + - 2960 + - 2000 + - 200 + - 80 + labels: {} + - id: 6 + kind: expressions + ref: "" + arguments: + - target: caseUpdate.values.CaseId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: caseUpdate.values.Description + source: "" + expr: '"State set to \"Working\""' + value: null + type: String + tests: [] + - target: caseUpdate.values.Type + source: "" + expr: '"State change"' + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + value: Set case update data + xywh: + - 2960 + - 2200 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: caseUpdate + value: null + type: ComposeRecord + tests: [] + results: + - target: caseUpdate + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Create case update + xywh: + - 3240 + - 2000 + - 200 + - 80 + labels: {} + - id: 14 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Check if Status is "Working" + xywh: + - 2320 + - 2000 + - 200 + - 80 + labels: {} + - id: 19 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Case Status already set to "Working" + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + value: 'Warning: Status already set to "Working"' + xywh: + - 2320 + - 2200 + - 200 + - 80 + labels: {} + - id: 20 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + - target: edit + source: "" + expr: "false" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Refresh page + xywh: + - 3240 + - 2200 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 4 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 4 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 5 + childid: 6 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 6 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: record.values.Status != "Working" + parentid: 14 + childid: 3 + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 14 + childid: 19 + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 7 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Opportunity-NewQuote: + meta: + name: CRM - Opportunity - New Quote + description: Creates a new Quote record from an existing Opportunity + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module + op: = + values: + - Opportunity + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Create a new quote + xywh: + - 2000 + - 2200 + - 200 + - 80 + steps: + - id: 3 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Initial record validation + xywh: + - 2240 + - 2200 + - 200 + - 80 + labels: {} + - id: 4 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Please link the opportunity to an account before generating a quote + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "4" + parent: "1" + value: Notify missing account + xywh: + - 2600 + - 2200 + - 200 + - 80 + labels: {} + - id: 5 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Invalid record + xywh: + - 2840 + - 2200 + - 200 + - 80 + labels: {} + - id: 6 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + value: Fetch settings + xywh: + - 2240 + - 2360 + - 200 + - 80 + labels: {} + - id: 7 + kind: expressions + ref: "" + arguments: + - target: nextQuoteNumber + source: "" + expr: settings.values.QuoteNextNumber + value: null + type: Integer + tests: [] + - target: settings.values.QuoteNextNumber + source: "" + expr: settings.values.QuoteNextNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Prepare setting values + xywh: + - 2480 + - 2360 + - 200 + - 80 + labels: {} + - id: 8 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + - target: record + source: "" + expr: record.values.AccountId + value: null + type: ID + tests: [] + results: + - target: account + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + value: Fetch related account + xywh: + - 2240 + - 2520 + - 200 + - 80 + labels: {} + - id: 9 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + - target: query + source: "" + expr: '"AccountId=" + account.recordID' + value: null + type: String + tests: [] + results: + - target: contacts + source: "" + expr: records + value: null + type: "" + tests: [] + - target: contectCount + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Fetch related contact + xywh: + - 2520 + - 2720 + - 200 + - 80 + labels: {} + - id: 10 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + value: Only one contact? + xywh: + - 2760 + - 2720 + - 200 + - 80 + labels: {} + - id: 11 + kind: expressions + ref: "" + arguments: + - target: contact + source: "" + expr: contacts[0] + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Use the only contact + xywh: + - 2776 + - 2880 + - 200 + - 80 + labels: {} + - id: 12 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: contacts + value: null + type: Array + tests: [] + results: + - target: c + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + value: Find the primary contact + xywh: + - 3176 + - 2720 + - 200 + - 80 + labels: {} + - id: 13 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Is primary contact? + xywh: + - 3168 + - 2880 + - 200 + - 80 + labels: {} + - id: 14 + kind: expressions + ref: "" + arguments: + - target: contact + source: "" + expr: c + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Set contact + xywh: + - 3168 + - 3000 + - 200 + - 80 + labels: {} + - id: 15 + kind: break + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + value: Primary contact found + xywh: + - 3160 + - 3120 + - 200 + - 80 + labels: {} + - id: 16 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: null + xywh: + - 3536 + - 2880 + - 200 + - 80 + labels: {} + - id: 17 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Quote + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: quote + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + value: Prepare quote record + xywh: + - 2240 + - 3240 + - 200 + - 80 + labels: {} + - id: 18 + kind: expressions + ref: "" + arguments: + - target: quote.values.Status + source: "" + expr: '"Draft"' + value: null + type: String + tests: [] + - target: quote.values.OpportunityId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: quote.values.GrandTotal + source: "" + expr: record.values.Amount + value: null + type: Float + tests: [] + - target: quote.values.PricebookId + source: "" + expr: record.values.PricebookId + value: null + type: ID + tests: [] + - target: quote.values.Name + source: "" + expr: record.values.Name + value: null + type: String + tests: [] + - target: quote.values.Subtotal + source: "" + expr: record.values.Amount + value: null + type: Float + tests: [] + - target: quote.values.TotalPrice + source: "" + expr: record.values.Amount + value: null + type: Float + tests: [] + - target: quote.values.ContactId + source: "" + expr: contact.recordID + value: null + type: ID + tests: [] + - target: quote.values.Email + source: "" + expr: contact.values.Email + value: null + type: String + tests: [] + - target: quote.values.Phone + source: "" + expr: contact.values.Phone + value: null + type: String + tests: [] + - target: quote.values.Fax + source: "" + expr: contact.values.Fax + value: null + type: String + tests: [] + - target: quote.values.AccountId + source: "" + expr: account.recordID + value: null + type: ID + tests: [] + - target: quote.values.BillingStreet + source: "" + expr: account.values.BillingStreet + value: null + type: String + tests: [] + - target: quote.values.BillingCity + source: "" + expr: account.values.BillingCity + value: null + type: String + tests: [] + - target: quote.values.BillingState + source: "" + expr: account.values.BillingState + value: null + type: String + tests: [] + - target: quote.values.BillingPostalCode + source: "" + expr: account.values.BillingPostalCode + value: null + type: String + tests: [] + - target: quote.values.BillingCountry + source: "" + expr: account.values.BillingCountry + value: null + type: String + tests: [] + - target: quote.values.BillingName + source: "" + expr: account.values.AccountName + value: null + type: String + tests: [] + - target: quote.values.QuoteToStreet + source: "" + expr: account.values.BillingStreet + value: null + type: String + tests: [] + - target: quote.values.QuoteToCity + source: "" + expr: account.values.BillingCity + value: null + type: String + tests: [] + - target: quote.values.QuoteToState + source: "" + expr: account.values.BillingState + value: null + type: String + tests: [] + - target: quote.values.QuoteToPostalCode + source: "" + expr: account.values.BillingPostalCode + value: null + type: String + tests: [] + - target: quote.values.QuoteToCountry + source: "" + expr: account.values.BillingCountry + value: null + type: String + tests: [] + - target: quote.values.QuoteToName + source: "" + expr: account.values.AccountName + value: null + type: String + tests: [] + - target: quote.values.ShippingStreet + source: "" + expr: account.values.BillingStreet + value: null + type: String + tests: [] + - target: quote.values.ShippingCity + source: "" + expr: account.values.BillingCity + value: null + type: String + tests: [] + - target: quote.values.ShippingState + source: "" + expr: account.values.BillingState + value: null + type: String + tests: [] + - target: quote.values.ShippingPostalCode + source: "" + expr: account.values.BillingPostalCode + value: null + type: String + tests: [] + - target: quote.values.ShippingCountry + source: "" + expr: account.values.BillingCountry + value: null + type: String + tests: [] + - target: quote.values.ShippingName + source: "" + expr: account.values.AccountName + value: null + type: String + tests: [] + - target: quote.values.ExpirationDate + source: "" + expr: modDate(now(), settings.values.OpportunityCloseDateDays) + value: null + type: DateTime + tests: [] + - target: quote.values.QuoteNumber + source: "" + expr: nextQuoteNumber + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + value: Set quote parameters + xywh: + - 2496 + - 3240 + - 200 + - 80 + labels: {} + - id: 19 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: quote + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: quote + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + value: Save quote + xywh: + - 2784 + - 3240 + - 200 + - 80 + labels: {} + - id: 20 + kind: iterator + ref: composeRecordsEach + arguments: + - target: module + source: "" + expr: "" + value: OpportunityLineItem + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + - target: query + source: "" + expr: '"OpportunityId="+record.recordID' + value: null + type: String + tests: [] + - target: limit + source: "" + expr: "" + value: "0" + type: UnsignedInteger + tests: [] + results: + - target: opportunityLineItem + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Convert opportunity line items to quote line items + xywh: + - 2232 + - 3440 + - 200 + - 80 + labels: {} + - id: 21 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: QuoteLineItem + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: quoteLineItem + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Prepare a quote line item + xywh: + - 2240 + - 3568 + - 200 + - 80 + labels: {} + - id: 22 + kind: expressions + ref: "" + arguments: + - target: quoteLineItem.values.Discount + source: "" + expr: opportunityLineItem.values.Discount + value: null + type: Float + tests: [] + - target: quoteLineItem.values.Description + source: "" + expr: opportunityLineItem.values.Description + value: null + type: String + tests: [] + - target: quoteLineItem.values.ListPrice + source: "" + expr: opportunityLineItem.values.ListPrice + value: null + type: Float + tests: [] + - target: quoteLineItem.values.PricebookEntryId + source: "" + expr: opportunityLineItem.values.PricebookEntryId + value: null + type: Any + tests: [] + - target: quoteLineItem.values.ProductId + source: "" + expr: opportunityLineItem.values.ProductId + value: null + type: ID + tests: [] + - target: quoteLineItem.values.ProductCode + source: "" + expr: opportunityLineItem.values.ProductCode + value: null + type: String + tests: [] + - target: quoteLineItem.values.Quantity + source: "" + expr: opportunityLineItem.values.Quantity + value: null + type: Integer + tests: [] + - target: quoteLineItem.values.UnitPrice + source: "" + expr: opportunityLineItem.values.UnitPrice + value: null + type: Float + tests: [] + - target: quoteLineItem.values.Subtotal + source: "" + expr: opportunityLineItem.values.Subtotal + value: null + type: Float + tests: [] + - target: quoteLineItem.values.TotalPrice + source: "" + expr: opportunityLineItem.values.TotalPrice + value: null + type: Float + tests: [] + - target: quoteLineItem.values.QuoteId + source: "" + expr: quote.recordID + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "22" + parent: "1" + value: Set quote line item parameters + xywh: + - 2240 + - 3688 + - 200 + - 80 + labels: {} + - id: 23 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: quoteLineItem + value: null + type: ComposeRecord + tests: [] + results: + - target: quoteLineItem + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + value: Save quote line item + xywh: + - 2240 + - 3816 + - 200 + - 80 + labels: {} + - id: 24 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "24" + parent: "1" + value: null + xywh: + - 2240 + - 3952 + - 200 + - 80 + labels: {} + - id: 25 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: settings + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "25" + parent: "1" + value: Update settings + xywh: + - 2240 + - 4144 + - 200 + - 80 + labels: {} + - id: 26 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The new quote has been created. + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: Notify success + xywh: + - 2248 + - 4288 + - 200 + - 80 + labels: {} + - id: 38 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "38" + parent: "1" + value: Prepare default contact + xywh: + - 2240 + - 2720 + - 200 + - 80 + labels: {} + - id: 71 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: record + source: "" + expr: quote + value: null + type: ComposeRecord + tests: [] + - target: edit + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "71" + parent: "1" + value: Redirect to quote edit + xywh: + - 2528 + - 4288 + - 200 + - 80 + labels: {} + paths: + - expr: 'record.values.AccountId ? false : true' + parentid: 3 + childid: 4 + meta: + name: "" + description: "" + visual: + id: "30" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 3 + childid: 6 + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 4 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "32" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 6 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 7 + childid: 8 + meta: + name: "" + description: "" + visual: + id: "34" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 9 + childid: 10 + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 8 + childid: 38 + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 38 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "40" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: contactCount == 1 + parentid: 10 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 10 + childid: 12 + meta: + name: "" + description: "" + visual: + id: "42" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 12 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Loop body' + - expr: c.values.IsPrimary + parentid: 13 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 14 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "45" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 13 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 11 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "47" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 12 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "48" + parent: "1" + points: + - x: 3824 + "y": 2760 + - x: 3824 + "y": 3216 + - x: 2200 + "y": 3216 + - x: 2200 + "y": 3300 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0; + value: '#2 - Loop end' + - expr: "" + parentid: 20 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "52" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Loop body' + - expr: "" + parentid: 21 + childid: 22 + meta: + name: "" + description: "" + visual: + id: "53" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 22 + childid: 23 + meta: + name: "" + description: "" + visual: + id: "54" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 23 + childid: 24 + meta: + name: "" + description: "" + visual: + id: "55" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 20 + childid: 25 + meta: + name: "" + description: "" + visual: + id: "56" + parent: "1" + points: + - x: 2672 + "y": 3480 + - x: 2672 + "y": 4080 + - x: 2200 + "y": 4080 + - x: 2200 + "y": 4184 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Loop end' + - expr: "" + parentid: 25 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "57" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 17 + childid: 18 + meta: + name: "" + description: "" + visual: + id: "68" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 18 + childid: 19 + meta: + name: "" + description: "" + visual: + id: "69" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 19 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "70" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 26 + childid: 71 + meta: + name: "" + description: "" + visual: + id: "72" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Lead-UpdateCampaigns: + meta: + name: CRM - Lead - Update Campaigns + description: Update related Campaigns after a Lead is created, updated or deleted + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: afterDelete + constraints: + - name: module.handle + op: = + values: + - Lead + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "10" + parent: "1" + points: + - x: 2400 + "y": 2280 + - x: 2400 + "y": 2200 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "4" + id: "4" + parent: "1" + value: After Delete Lead + xywh: + - 2160 + - 2240 + - 200 + - 80 + - resourceType: compose:record + eventType: afterCreate + constraints: + - name: module.handle + op: = + values: + - Lead + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "12" + parent: "1" + points: + - x: 2400 + "y": 2040 + - x: 2400 + "y": 2120 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: After Create Lead + xywh: + - 2160 + - 2000 + - 200 + - 80 + - resourceType: compose:record + eventType: afterUpdate + constraints: + - name: module.handle + op: = + values: + - Lead + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "11" + parent: "1" + points: + - x: 2400 + "y": 2160 + - x: 2400 + "y": 2160 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: After Update Lead + xywh: + - 2160 + - 2120 + - 200 + - 80 + steps: + - id: 5 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: '[]' + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set CampaignIds + xywh: + - 2440 + - 2120 + - 200 + - 80 + labels: {} + - id: 14 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'record.recordID != "0" ? record.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Iterate record CampaignIDs + xywh: + - 2680 + - 2120 + - 200 + - 80 + labels: {} + - id: 16 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: push(campaignIDs, "recordID = " + campaignID) + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: Push campaignID + xywh: + - 2680 + - 2440 + - 200 + - 80 + labels: {} + - id: 21 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Check next ID + xywh: + - 2440 + - 2440 + - 200 + - 80 + labels: {} + - id: 26 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: If already pushed + xywh: + - 2680 + - 2280 + - 200 + - 80 + labels: {} + - id: 49 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'oldRecord.recordID != "0" ? oldRecord.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "49" + parent: "1" + value: Iterate oldRecord CampaignIDs + xywh: + - 3040 + - 2120 + - 200 + - 80 + labels: {} + - id: 58 + kind: expressions + ref: "" + arguments: + - target: campaignFilter + source: "" + expr: join(campaignIDs, " OR ") + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "58" + parent: "1" + value: Set campaign filter + xywh: + - 3400 + - 2120 + - 200 + - 80 + labels: {} + - id: 61 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Campaigns + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: campaignFilter + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: campaigns + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfCampaigns + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "61" + parent: "1" + value: Get Campaigns + xywh: + - 3400 + - 2280 + - 200 + - 80 + labels: {} + - id: 63 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: campaigns + value: null + type: Array + tests: [] + results: + - target: campaign + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "63" + parent: "1" + value: Iterate over Campaigns + xywh: + - 3400 + - 2440 + - 200 + - 80 + labels: {} + - id: 65 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "65" + parent: "1" + value: End + xywh: + - 3040 + - 2440 + - 200 + - 80 + labels: {} + - id: 66 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: '"CampaignId = " + campaign.recordID' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: NumberOfLeads + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Get NumberOfLeads + xywh: + - 3720 + - 2120 + - 200 + - 80 + labels: {} + - id: 71 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: '"(CampaignId = " + campaign.recordID + ") AND IsConverted"' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: NumberOfConvertedLeads + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "71" + parent: "1" + value: Get NumberOfConvertedLeads + xywh: + - 3720 + - 2280 + - 200 + - 80 + labels: {} + - id: 73 + kind: expressions + ref: "" + arguments: + - target: campaign.values.NumberOfLeads + source: "" + expr: NumberOfLeads + value: null + type: Integer + tests: [] + - target: campaign.values.NumberOfConvertedLeads + source: "" + expr: NumberOfConvertedLeads + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "73" + parent: "1" + value: Set Campaign Values + xywh: + - 3720 + - 2440 + - 200 + - 80 + labels: {} + - id: 75 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: campaign + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "75" + parent: "1" + value: Save Campaign + xywh: + - 4040 + - 2280 + - 200 + - 80 + labels: {} + paths: + - expr: has(campaignIDs, campaignID) + parentid: 26 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 26 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 49 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "59" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 49 + childid: 58 + meta: + name: "" + description: "" + visual: + id: "60" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 58 + childid: 61 + meta: + name: "" + description: "" + visual: + id: "62" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 61 + childid: 63 + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 63 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 63 + childid: 65 + meta: + name: "" + description: "" + visual: + id: "68" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 66 + childid: 71 + meta: + name: "" + description: "" + visual: + id: "72" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 71 + childid: 73 + meta: + name: "" + description: "" + visual: + id: "74" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 73 + childid: 75 + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 5 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "91" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 14 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "93" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 14 + childid: 49 + meta: + name: "" + description: "" + visual: + id: "94" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + CRM-Account-UpdateCampaigns: + meta: + name: CRM - Account - Update Campaigns + description: Update related Campaigns after a Account is created, updated or deleted + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: afterDelete + constraints: + - name: module.handle + op: = + values: + - Account + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "10" + parent: "1" + points: + - x: 2400 + "y": 2280 + - x: 2400 + "y": 2200 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "4" + id: "4" + parent: "1" + value: After Delete Account + xywh: + - 2160 + - 2240 + - 200 + - 80 + - resourceType: compose:record + eventType: afterCreate + constraints: + - name: module.handle + op: = + values: + - Account + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "12" + parent: "1" + points: + - x: 2400 + "y": 2040 + - x: 2400 + "y": 2120 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: After Create Account + xywh: + - 2160 + - 2000 + - 200 + - 80 + - resourceType: compose:record + eventType: afterUpdate + constraints: + - name: module.handle + op: = + values: + - Account + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "11" + parent: "1" + points: + - x: 2400 + "y": 2160 + - x: 2400 + "y": 2160 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: After Update Account + xywh: + - 2160 + - 2120 + - 200 + - 80 + steps: + - id: 5 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: '[]' + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set CampaignIds + xywh: + - 2440 + - 2120 + - 200 + - 80 + labels: {} + - id: 14 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'record.recordID != 0 ? record.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Iterate record CampaignIDs + xywh: + - 2680 + - 2120 + - 200 + - 80 + labels: {} + - id: 16 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: push(campaignIDs, "recordID = " + campaignID) + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: Push campaignID + xywh: + - 2680 + - 2440 + - 200 + - 80 + labels: {} + - id: 21 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Check next ID + xywh: + - 2440 + - 2440 + - 200 + - 80 + labels: {} + - id: 26 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: If already pushed + xywh: + - 2680 + - 2280 + - 200 + - 80 + labels: {} + - id: 49 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'oldRecord.recordID != 0 ? oldRecord.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "49" + parent: "1" + value: Iterate oldrecord CampaignIDs + xywh: + - 3000 + - 2120 + - 200 + - 80 + labels: {} + - id: 58 + kind: expressions + ref: "" + arguments: + - target: campaignFilter + source: "" + expr: join(campaignIDs, " OR ") + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "58" + parent: "1" + value: Set campaign filter + xywh: + - 3320 + - 2120 + - 200 + - 80 + labels: {} + - id: 61 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Campaigns + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: campaignFilter + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: campaigns + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfCampaigns + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "61" + parent: "1" + value: Get Campaigns + xywh: + - 3320 + - 2280 + - 200 + - 80 + labels: {} + - id: 63 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: campaigns + value: null + type: Array + tests: [] + results: + - target: campaign + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "63" + parent: "1" + value: Iterate over Campaigns + xywh: + - 3320 + - 2440 + - 200 + - 80 + labels: {} + - id: 65 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "65" + parent: "1" + value: End + xywh: + - 3000 + - 2440 + - 200 + - 80 + labels: {} + - id: 66 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: '"CampaignId = " + campaign.recordID' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: NumberOfAccounts + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Get NumberOfAccounts + xywh: + - 3640 + - 2120 + - 200 + - 80 + labels: {} + - id: 73 + kind: expressions + ref: "" + arguments: + - target: campaign.values.NumberOfAccounts + source: "" + expr: NumberOfAccounts + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "73" + parent: "1" + value: Set Campaign Values + xywh: + - 3640 + - 2280 + - 200 + - 80 + labels: {} + - id: 75 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: campaign + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "75" + parent: "1" + value: Save Campaign + xywh: + - 3640 + - 2440 + - 200 + - 80 + labels: {} + paths: + - expr: has(campaignIDs, campaignID) + parentid: 26 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 26 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 14 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "48" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 14 + childid: 49 + meta: + name: "" + description: "" + visual: + id: "50" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 5 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "57" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 49 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "59" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 49 + childid: 58 + meta: + name: "" + description: "" + visual: + id: "60" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 58 + childid: 61 + meta: + name: "" + description: "" + visual: + id: "62" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 61 + childid: 63 + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 63 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 63 + childid: 65 + meta: + name: "" + description: "" + visual: + id: "68" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 73 + childid: 75 + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 66 + childid: 73 + meta: + name: "" + description: "" + visual: + id: "77" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Contact-UpdateCampaigns: + meta: + name: CRM - Contact - Update Campaigns + description: Update related Campaigns after a Contact is created, updated or deleted + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: afterDelete + constraints: + - name: module.handle + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "10" + parent: "1" + points: + - x: 2400 + "y": 2280 + - x: 2400 + "y": 2200 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "4" + id: "4" + parent: "1" + value: After Delete Contact + xywh: + - 2160 + - 2240 + - 200 + - 80 + - resourceType: compose:record + eventType: afterCreate + constraints: + - name: module.handle + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "12" + parent: "1" + points: + - x: 2400 + "y": 2040 + - x: 2400 + "y": 2120 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: After Create Contact + xywh: + - 2160 + - 2000 + - 200 + - 80 + - resourceType: compose:record + eventType: afterUpdate + constraints: + - name: module.handle + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "11" + parent: "1" + points: + - x: 2400 + "y": 2160 + - x: 2400 + "y": 2160 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: After Update Contact + xywh: + - 2160 + - 2120 + - 200 + - 80 + steps: + - id: 5 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: '[]' + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set CampaignIds + xywh: + - 2440 + - 2120 + - 200 + - 80 + labels: {} + - id: 14 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'record.recordID != 0 ? record.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Iterate record CampaignIDs + xywh: + - 2680 + - 2120 + - 200 + - 80 + labels: {} + - id: 16 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: push(campaignIDs, "recordID = " + campaignID) + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: Push campaignID + xywh: + - 2680 + - 2440 + - 200 + - 80 + labels: {} + - id: 21 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Check next ID + xywh: + - 2440 + - 2440 + - 200 + - 80 + labels: {} + - id: 26 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: If already pushed + xywh: + - 2680 + - 2280 + - 200 + - 80 + labels: {} + - id: 49 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'oldRecord.recordID != 0 ? oldRecord .values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "49" + parent: "1" + value: Iterate oldrecord CampaignIDs + xywh: + - 3000 + - 2120 + - 200 + - 80 + labels: {} + - id: 58 + kind: expressions + ref: "" + arguments: + - target: campaignFilter + source: "" + expr: join(campaignIDs, " OR ") + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "58" + parent: "1" + value: Set campaign filter + xywh: + - 3320 + - 2120 + - 200 + - 80 + labels: {} + - id: 61 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Campaigns + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: campaignFilter + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: campaigns + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfCampaigns + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "61" + parent: "1" + value: Get Campaigns + xywh: + - 3320 + - 2280 + - 200 + - 80 + labels: {} + - id: 63 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: campaigns + value: null + type: Array + tests: [] + results: + - target: campaign + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "63" + parent: "1" + value: Iterate over Campaigns + xywh: + - 3320 + - 2440 + - 200 + - 80 + labels: {} + - id: 65 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "65" + parent: "1" + value: End + xywh: + - 3000 + - 2440 + - 200 + - 80 + labels: {} + - id: 66 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: '"CampaignId = " + campaign.recordID' + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: NumberOfContacts + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Get NumberOfContacts + xywh: + - 3640 + - 2120 + - 200 + - 80 + labels: {} + - id: 73 + kind: expressions + ref: "" + arguments: + - target: campaign.values.NumberOfContacts + source: "" + expr: NumberOfContacts + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "73" + parent: "1" + value: Set Campaign Values + xywh: + - 3640 + - 2280 + - 200 + - 80 + labels: {} + - id: 75 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: campaign + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "75" + parent: "1" + value: Save Campaign + xywh: + - 3640 + - 2440 + - 200 + - 80 + labels: {} + paths: + - expr: has(campaignIDs, campaignID) + parentid: 26 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 26 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 14 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "48" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 14 + childid: 49 + meta: + name: "" + description: "" + visual: + id: "50" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 5 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "57" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 49 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "59" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 49 + childid: 58 + meta: + name: "" + description: "" + visual: + id: "60" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 58 + childid: 61 + meta: + name: "" + description: "" + visual: + id: "62" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 61 + childid: 63 + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 63 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 63 + childid: 65 + meta: + name: "" + description: "" + visual: + id: "68" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 73 + childid: 75 + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 66 + childid: 73 + meta: + name: "" + description: "" + visual: + id: "77" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + CRM-Lead-ToAccountAndOpportunity: + meta: + name: CRM - Lead - To Account and Opportunity + description: Converts Lead to Account and Opportunity + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module + op: = + values: + - Lead + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 77 + meta: + visual: + edges: + - childID: "77" + meta: + description: "" + label: "" + visual: + id: "78" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "49" + id: "49" + parent: "1" + value: To Account and Opportunity + xywh: + - 1920 + - 2520 + - 200 + - 80 + steps: + - id: 35 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "35" + parent: "1" + value: Already converted? + xywh: + - 2488 + - 2520 + - 200 + - 80 + labels: {} + - id: 37 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: account + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + value: Prepare account record + xywh: + - 2496 + - 2720 + - 200 + - 80 + labels: {} + - id: 38 + kind: expressions + ref: "" + arguments: + - target: account.values.BillingStreet + source: "" + expr: record.values.Street + value: null + type: String + tests: [] + - target: account.values.BillingCity + source: "" + expr: record.values.City + value: null + type: String + tests: [] + - target: account.values.BillingState + source: "" + expr: record.values.State + value: null + type: String + tests: [] + - target: account.values.BillingPostalCode + source: "" + expr: record.values.PostalCode + value: null + type: String + tests: [] + - target: account.values.BillingCountry + source: "" + expr: record.values.Country + value: null + type: String + tests: [] + - target: account.values.ShippingStreet + source: "" + expr: record.values.Street + value: null + type: String + tests: [] + - target: account.values.ShippingCity + source: "" + expr: record.values.City + value: null + type: String + tests: [] + - target: account.values.ShippingState + source: "" + expr: record.values.State + value: null + type: String + tests: [] + - target: account.values.ShippingPostalCode + source: "" + expr: record.values.PostalCode + value: null + type: String + tests: [] + - target: account.values.ShippingCountry + source: "" + expr: record.values.Country + value: null + type: String + tests: [] + - target: account.values.AnnualRevenue + source: "" + expr: record.values.AnnualRevenue + value: null + type: String + tests: [] + - target: account.values.Description + source: "" + expr: record.values.Description + value: null + type: String + tests: [] + - target: account.values.AccountName + source: "" + expr: record.values.Company + value: null + type: String + tests: [] + - target: account.values.Fax + source: "" + expr: record.values.Fax + value: null + type: String + tests: [] + - target: account.values.Industry + source: "" + expr: record.values.Industry + value: null + type: String + tests: [] + - target: account.values.OwnerId + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + - target: account.values.AccountSource + source: "" + expr: record.values.LeadSource + value: null + type: String + tests: [] + - target: account.values.Phone + source: "" + expr: record.values.Phone + value: null + type: String + tests: [] + - target: account.values.NumberOfEmployees + source: "" + expr: record.values.NumberOfEmployees + value: null + type: Integer + tests: [] + - target: account.values.Rating + source: "" + expr: record.values.Rating + value: null + type: String + tests: [] + - target: account.values.Website + source: "" + expr: record.values.Website + value: null + type: String + tests: [] + - target: account.values.Twitter + source: "" + expr: record.values.Twitter + value: null + type: String + tests: [] + - target: account.values.Facebook + source: "" + expr: record.values.Facebook + value: null + type: String + tests: [] + - target: account.values.LinkedIn + source: "" + expr: record.values.LinkedIn + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "38" + parent: "1" + value: Populate account data + xywh: + - 2728 + - 2720 + - 200 + - 80 + labels: {} + - id: 39 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: account + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: account + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + value: Create account + xywh: + - 2968 + - 2720 + - 200 + - 80 + labels: {} + - id: 40 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "40" + parent: "1" + value: Prepare contact record + xywh: + - 2512 + - 2904 + - 200 + - 80 + labels: {} + - id: 41 + kind: expressions + ref: "" + arguments: + - target: contact.values.MailingStreet + source: "" + expr: record.values.Street + value: null + type: String + tests: [] + - target: contact.values.MailingCity + source: "" + expr: record.values.City + value: null + type: String + tests: [] + - target: contact.values.MailingState + source: "" + expr: record.values.State + value: null + type: String + tests: [] + - target: contact.values.MailingPostalCode + source: "" + expr: record.values.PostalCode + value: null + type: String + tests: [] + - target: contact.values.MailingCountry + source: "" + expr: record.values.Country + value: null + type: String + tests: [] + - target: contact.values.Description + source: "" + expr: record.values.Description + value: null + type: String + tests: [] + - target: contact.values.DoNotCall + source: "" + expr: record.values.DoNotCall + value: null + type: Boolean + tests: [] + - target: contact.values.Email + source: "" + expr: record.values.Email + value: null + type: String + tests: [] + - target: contact.values.HasOptedOutOfEmail + source: "" + expr: record.values.HasOptedOutOfEmail + value: null + type: Boolean + tests: [] + - target: contact.values.Fax + source: "" + expr: record.values.Fax + value: null + type: String + tests: [] + - target: contact.values.HasOptedOutOfFax + source: "" + expr: record.values.HasOptedOutOfFax + value: null + type: Boolean + tests: [] + - target: contact.values.OwnerId + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + - target: contact.values.LeadSource + source: "" + expr: record.values.LeadSource + value: null + type: String + tests: [] + - target: contact.values.Twitter + source: "" + expr: record.values.Twitter + value: null + type: String + tests: [] + - target: contact.values.Facebook + source: "" + expr: record.values.Facebook + value: null + type: String + tests: [] + - target: contact.values.LinkedIn + source: "" + expr: record.values.LinkedIn + value: null + type: String + tests: [] + - target: contact.values.Salutation + source: "" + expr: record.values.Salutation + value: null + type: String + tests: [] + - target: contact.values.FirstName + source: "" + expr: record.values.FirstName + value: null + type: String + tests: [] + - target: contact.values.LastName + source: "" + expr: record.values.LastName + value: null + type: String + tests: [] + - target: contact.values.MobilePhone + source: "" + expr: record.values.MobilePhone + value: null + type: String + tests: [] + - target: contact.values.Phone + source: "" + expr: record.values.Phone + value: null + type: String + tests: [] + - target: contact.values.Title + source: "" + expr: record.values.Title + value: null + type: String + tests: [] + - target: contact.values.IsPrimary + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + - target: contact.values.AccountId + source: "" + expr: account.recordID + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + value: Populate contact data + xywh: + - 2768 + - 2904 + - 200 + - 80 + labels: {} + - id: 42 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: contact + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "42" + parent: "1" + value: Create contact + xywh: + - 3032 + - 2904 + - 200 + - 80 + labels: {} + - id: 43 + kind: expressions + ref: "" + arguments: + - target: record.values.Status + source: "" + expr: '"Converted"' + value: null + type: String + tests: [] + - target: record.values.IsConverted + source: "" + expr: '"Yes"' + value: null + type: String + tests: [] + - target: record.values.ConvertedAccountId + source: "" + expr: account.recordID + value: null + type: ID + tests: [] + - target: record.values.ConvertedContactId + source: "" + expr: contact.recordID + value: null + type: ID + tests: [] + - target: record.values.ConvertedDate + source: "" + expr: account.createdAt + value: null + type: DateTime + tests: [] + - target: record.values.ConvertedOpportunityId + source: "" + expr: opportunity.recordID + value: null + type: ID + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + value: Update lead data + xywh: + - 2480 + - 3400 + - 200 + - 80 + labels: {} + - id: 44 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: + - target: record + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + value: Save lead + xywh: + - 2760 + - 3400 + - 200 + - 80 + labels: {} + - id: 64 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Opportunity + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: opportunity + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + value: Prepare opportunity record + xywh: + - 2512 + - 3064 + - 200 + - 80 + labels: {} + - id: 65 + kind: expressions + ref: "" + arguments: + - target: opportunity.values.Description + source: "" + expr: record.values.Description + value: null + type: String + tests: [] + - target: opportunity.values.OwnerId + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + - target: opportunity.values.LeadSource + source: "" + expr: record.values.LeadSource + value: null + type: String + tests: [] + - target: opportunity.values.Name + source: "" + expr: '"(unnamed)"' + value: null + type: String + tests: [] + - target: opportunity.values.AccountId + source: "" + expr: account.recordID + value: null + type: ID + tests: [] + - target: opportunity.values.IsClosed + source: "" + expr: '"No"' + value: null + type: String + tests: [] + - target: opportunity.values.IsWon + source: "" + expr: '"No"' + value: null + type: String + tests: [] + - target: opportunity.values.CloseDate + source: "" + expr: "" + value: null + type: String + tests: [] + - target: opportunity.values.Probability + source: "" + expr: settings.values.OpportunityProbability + value: null + type: Float + tests: [] + - target: opportunity.values.ForecastCategory + source: "" + expr: settings.values.OpportunityForecaseCategory + value: null + type: String + tests: [] + - target: opportunity.values.StageName + source: "" + expr: settings.values.OpportunityStagename + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "65" + parent: "1" + value: Populate opportunity data + xywh: + - 2768 + - 3064 + - 200 + - 80 + labels: {} + - id: 66 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: opportunity + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: opportunity + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Create opportunity + xywh: + - 3032 + - 3064 + - 200 + - 80 + labels: {} + - id: 69 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: OpportunityContactRole + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: contactRole + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "69" + parent: "1" + value: Prepare opportunity contact role record + xywh: + - 2488 + - 3216 + - 200 + - 80 + labels: {} + - id: 70 + kind: expressions + ref: "" + arguments: + - target: contactRole.values.ContactId + source: "" + expr: contact.recordID + value: null + type: ID + tests: [] + - target: contactRole.values.OpportunityId + source: "" + expr: opportunity.recordID + value: null + type: ID + tests: [] + - target: contactRole.values.IsPrimary + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "70" + parent: "1" + value: Populate opportunity contact role data + xywh: + - 2784 + - 3224 + - 200 + - 80 + labels: {} + - id: 71 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: contactRole + expr: "" + value: null + type: ComposeRecord + tests: [] + results: + - target: contactRole + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "71" + parent: "1" + value: Create opportunity contact role + xywh: + - 3064 + - 3224 + - 200 + - 80 + labels: {} + - id: 77 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace.namespaceID + value: null + type: ID + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "77" + parent: "1" + value: Fetch settings + xywh: + - 2208 + - 2520 + - 200 + - 80 + labels: {} + - id: 113 + kind: prompt + ref: notification + arguments: + - target: message + source: "" + expr: "" + value: The lead has been converted + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "113" + parent: "1" + value: Lead converted + xywh: + - 2480 + - 3720 + - 200 + - 80 + labels: {} + - id: 115 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: crm + type: Handle + tests: [] + - target: record + source: opportunity + expr: "" + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "115" + parent: "1" + value: Redirect to opportunity page + xywh: + - 2768 + - 3720 + - 200 + - 80 + labels: {} + - id: 118 + kind: function + ref: emailSend + arguments: + - target: subject + source: "" + expr: subject.document + value: null + type: Reader + tests: [] + - target: to + source: "" + expr: owner + value: null + type: User + tests: [] + - target: html + source: "" + expr: content.document + value: null + type: Reader + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "118" + parent: "1" + value: Send email + xywh: + - 3608 + - 3560 + - 200 + - 80 + labels: {} + - id: 119 + kind: function + ref: usersLookup + arguments: + - target: lookup + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + results: + - target: owner + source: "" + expr: user + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "119" + parent: "1" + value: Get owner + xywh: + - 3328 + - 3560 + - 200 + - 80 + labels: {} + - id: 132 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "132" + parent: "1" + value: Has owner? + xywh: + - 3040 + - 3400 + - 200 + - 80 + labels: {} + - id: 139 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Info + type: String + tests: [] + - target: message + source: "" + expr: "" + value: This lead is already converted + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: info + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "139" + parent: "1" + value: Lead already converted + xywh: + - 2840 + - 2520 + - 200 + - 80 + labels: {} + - id: 140 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: "" + value: lead_converted_content + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: body + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/html + type: String + tests: [] + - target: variables + source: "" + expr: subjectRenderVariables + value: null + type: Vars + tests: [] + results: + - target: subject + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "140" + parent: "1" + value: Prepare email subject + xywh: + - 2760 + - 3560 + - 200 + - 80 + labels: {} + - id: 142 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: "" + value: lead_converted_subject + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: subject + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/plain + type: String + tests: [] + - target: variables + source: "" + expr: contentRenderVariables + value: null + type: Vars + tests: [] + results: + - target: subject + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "142" + parent: "1" + value: Prepare email content + xywh: + - 3040 + - 3560 + - 200 + - 80 + labels: {} + - id: 145 + kind: expressions + ref: "" + arguments: + - target: subjectRenderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: subjectRenderVariables.account + source: "" + expr: account + value: null + type: ComposeRecord + tests: [] + - target: contentRenderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: contentRenderVariables.lead + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + - target: contentRenderVariables.account + source: "" + expr: account + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "145" + parent: "1" + value: Prepare render Vars + xywh: + - 2480 + - 3560 + - 200 + - 80 + labels: {} + paths: + - expr: record.values.Status == "Converted" + parentid: 35 + childid: 139 + meta: + name: "" + description: "" + visual: + id: "50" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 35 + childid: 37 + meta: + name: "" + description: "" + visual: + id: "51" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 37 + childid: 38 + meta: + name: "" + description: "" + visual: + id: "53" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 38 + childid: 39 + meta: + name: "" + description: "" + visual: + id: "54" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 39 + childid: 40 + meta: + name: "" + description: "" + visual: + id: "55" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 40 + childid: 41 + meta: + name: "" + description: "" + visual: + id: "56" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 41 + childid: 42 + meta: + name: "" + description: "" + visual: + id: "57" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 43 + childid: 44 + meta: + name: "" + description: "" + visual: + id: "59" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 77 + childid: 35 + meta: + name: "" + description: "" + visual: + id: "63" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: "" + - expr: "" + parentid: 64 + childid: 65 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 65 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "68" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 42 + childid: 64 + meta: + name: "" + description: "" + visual: + id: "74" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 66 + childid: 69 + meta: + name: "" + description: "" + visual: + id: "75" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 113 + childid: 115 + meta: + name: "" + description: "" + visual: + id: "120" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 118 + childid: 113 + meta: + name: "" + description: "" + visual: + id: "123" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 119 + childid: 118 + meta: + name: "" + description: "" + visual: + id: "124" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 70 + childid: 71 + meta: + name: "" + description: "" + visual: + id: "129" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 71 + childid: 43 + meta: + name: "" + description: "" + visual: + id: "130" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 69 + childid: 70 + meta: + name: "" + description: "" + visual: + id: "131" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 44 + childid: 132 + meta: + name: "" + description: "" + visual: + id: "133" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: record.values.OwnerId != 0 + parentid: 132 + childid: 145 + meta: + name: "" + description: "" + visual: + id: "134" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 132 + childid: 113 + meta: + name: "" + description: "" + visual: + id: "135" + parent: "1" + points: + - x: 3880 + "y": 3440 + - x: 3880 + "y": 3680 + - x: 2440 + "y": 3680 + - x: 2440 + "y": 3760 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 140 + childid: 142 + meta: + name: "" + description: "" + visual: + id: "143" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 142 + childid: 119 + meta: + name: "" + description: "" + visual: + id: "144" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 145 + childid: 140 + meta: + name: "" + description: "" + visual: + id: "146" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Contact-CreateNewCase: + meta: + name: CRM - Contact - Create New Case + description: Creates a new Case record from and existing Contact + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: namespace.handle + op: = + values: + - crm + - name: namespace.handle + op: = + values: + - Contact + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: OnManual Contact + xywh: + - 2000 + - 2000 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Fetch settings + xywh: + - 2280 + - 2000 + - 200 + - 80 + labels: {} + - id: 5 + kind: expressions + ref: "" + arguments: + - target: nextCaseNumber + source: "" + expr: 'settings.values.CaseNextNumber ? settings.values.CaseNextNumber : 0' + value: null + type: Integer + tests: [] + - target: settings.values.CaseNextNumber + source: "" + expr: settings.values.CaseNextNumber + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set nextCaseNumber + xywh: + - 2560 + - 2000 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: case + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Make Case + xywh: + - 2000 + - 2160 + - 200 + - 80 + labels: {} + - id: 9 + kind: expressions + ref: "" + arguments: + - target: case.values.OwnerId + source: "" + expr: record.values.OwnerId + value: null + type: ID + tests: [] + - target: case.values.Subject + source: "" + expr: '"(no subject)"' + value: null + type: String + tests: [] + - target: case.values.ContactId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: case.values.AccountId + source: "" + expr: 'record.values.AccountId ? record.values.AccountId : 0' + value: null + type: ID + tests: [] + - target: case.values.Status + source: "" + expr: '"New"' + value: null + type: String + tests: [] + - target: case.values.Priority + source: "" + expr: '"Low"' + value: null + type: String + tests: [] + - target: case.values.SuppliedName + source: "" + expr: trim(format("%s %s", record.values.FirstName, record.values.LastName)) + value: null + type: String + tests: [] + - target: case.values.SuppliedEmail + source: "" + expr: record.values.Email + value: null + type: String + tests: [] + - target: case.values.SuppliedPhone + source: "" + expr: record.values.Phone + value: null + type: String + tests: [] + - target: case.values.CaseNumber + source: "" + expr: nextCaseNumber + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Set Case Values + xywh: + - 2280 + - 2160 + - 200 + - 80 + labels: {} + - id: 11 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: case + value: null + type: ComposeRecord + tests: [] + results: + - target: case + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Create Case + xywh: + - 2560 + - 2160 + - 200 + - 80 + labels: {} + - id: 13 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Save settings + xywh: + - 2000 + - 2320 + - 200 + - 80 + labels: {} + - id: 15 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Success + type: String + tests: [] + - target: message + source: "" + expr: "" + value: The new case has been created + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: success + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + value: Notify Case created + xywh: + - 2280 + - 2320 + - 200 + - 80 + labels: {} + - id: 18 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: record + source: "" + expr: case + value: null + type: ComposeRecord + tests: [] + - target: edit + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + value: Go to record editor + xywh: + - 2560 + - 2320 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 5 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 7 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 9 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 13 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 15 + childid: 18 + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + CRM-Opportunity-UpdateCampaigns: + meta: + name: CRM - Opportunity - Update Campaigns + description: Update related Campaigns after an Opportunity is created, updated or deleted + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: afterDelete + constraints: + - name: module.handle + op: = + values: + - Opportunity + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "10" + parent: "1" + points: + - x: 2400 + "y": 2280 + - x: 2400 + "y": 2200 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "4" + id: "4" + parent: "1" + value: After Delete Opportunity + xywh: + - 2160 + - 2240 + - 200 + - 80 + - resourceType: compose:record + eventType: afterCreate + constraints: + - name: module.handle + op: = + values: + - Opportunity + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "12" + parent: "1" + points: + - x: 2400 + "y": 2040 + - x: 2400 + "y": 2120 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: After Create Opportunity + xywh: + - 2160 + - 2000 + - 200 + - 80 + - resourceType: compose:record + eventType: afterUpdate + constraints: + - name: module.handle + op: = + values: + - Opportunity + - name: namespace.handle + op: = + values: + - crm + enabled: true + stepID: 5 + meta: + visual: + edges: + - childID: "5" + meta: + description: "" + label: "" + visual: + id: "11" + parent: "1" + points: + - x: 2400 + "y": 2160 + - x: 2400 + "y": 2160 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: After Update Opportunity + xywh: + - 2160 + - 2120 + - 200 + - 80 + steps: + - id: 5 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: '[]' + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Set CampaignIds + xywh: + - 2440 + - 2120 + - 200 + - 80 + labels: {} + - id: 14 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'record.recordID != 0 ? record.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: Iterate record CampaignIDs + xywh: + - 2680 + - 2120 + - 200 + - 80 + labels: {} + - id: 16 + kind: expressions + ref: "" + arguments: + - target: campaignIDs + source: "" + expr: push(campaignIDs, "recordID = " + campaignID) + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + value: Push campaignID + xywh: + - 2680 + - 2440 + - 200 + - 80 + labels: {} + - id: 21 + kind: continue + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Check next ID + xywh: + - 2440 + - 2440 + - 200 + - 80 + labels: {} + - id: 26 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: If already pushed + xywh: + - 2680 + - 2280 + - 200 + - 80 + labels: {} + - id: 49 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'oldRecord.recordID != 0 ? oldRecord.values.CampaignId : []' + value: null + type: Array + tests: [] + results: + - target: campaignID + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "49" + parent: "1" + value: Iterate oldRecord CampaignIDs + xywh: + - 3040 + - 2120 + - 200 + - 80 + labels: {} + - id: 58 + kind: expressions + ref: "" + arguments: + - target: campaignFilter + source: "" + expr: join(campaignIDs, " OR ") + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "58" + parent: "1" + value: Set campaign filter + xywh: + - 3400 + - 2120 + - 200 + - 80 + labels: {} + - id: 61 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Campaigns + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: query + source: "" + expr: campaignFilter + value: null + type: String + tests: [] + - target: incTotal + source: "" + expr: "true" + value: null + type: Boolean + tests: [] + results: + - target: campaigns + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfCampaigns + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "61" + parent: "1" + value: Get Campaigns + xywh: + - 3400 + - 2280 + - 200 + - 80 + labels: {} + - id: 63 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: campaigns + value: null + type: Array + tests: [] + results: + - target: campaign + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "63" + parent: "1" + value: Iterate over Campaigns + xywh: + - 3400 + - 2440 + - 200 + - 80 + labels: {} + - id: 65 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "65" + parent: "1" + value: End + xywh: + - 3040 + - 2440 + - 200 + - 80 + labels: {} + - id: 73 + kind: expressions + ref: "" + arguments: + - target: campaign.values.NumberOfOpportunities + source: "" + expr: NumberOfOpportunities + value: null + type: Integer + tests: [] + - target: campaign.values.AmountAllOpportunities + source: "" + expr: AmountAllOpportunities + value: null + type: Float + tests: [] + - target: campaign.values.NumberOfWonOpportunities + source: "" + expr: NumberOfWonOpportunities + value: null + type: Integer + tests: [] + - target: campaign.values.AmountWonOpportunities + source: "" + expr: AmountWonOpportunities + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "73" + parent: "1" + value: Set Campaign Values + xywh: + - 4240 + - 2120 + - 200 + - 80 + labels: {} + - id: 75 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: campaign + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "75" + parent: "1" + value: Save Campaign + xywh: + - 4240 + - 2280 + - 200 + - 80 + labels: {} + - id: 104 + kind: function + ref: composeRecordsReport + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: metrics + source: "" + expr: "" + value: sum(Amount) AS amount + type: String + tests: [] + - target: dimensons + source: "" + expr: '"DATE_FORMAT(created_at, ''%Y-01-01'')"' + value: null + type: String + tests: [] + - target: filter + source: "" + expr: '"CampaignId = " + campaign.recordID' + value: null + type: String + tests: [] + results: + - target: report + source: "" + expr: report + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "104" + parent: "1" + value: Generate Report All + xywh: + - 3680 + - 2280 + - 200 + - 80 + labels: {} + - id: 110 + kind: expressions + ref: "" + arguments: + - target: NumberOfOpportunities + source: "" + expr: "0" + value: null + type: Integer + tests: [] + - target: AmountAllOpportunities + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "110" + parent: "1" + value: Set Number and Amount + xywh: + - 3680 + - 2120 + - 200 + - 80 + labels: {} + - id: 112 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'report ? report : []' + value: null + type: Array + tests: [] + results: + - target: dimension + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "112" + parent: "1" + value: Iterate report items + xywh: + - 3680 + - 2440 + - 200 + - 80 + labels: {} + - id: 123 + kind: expressions + ref: "" + arguments: + - target: NumberOfOpportunities + source: "" + expr: NumberOfOpportunities + dimension.count + value: null + type: Integer + tests: [] + - target: AmountAllOpportunities + source: "" + expr: 'AmountAllOpportunities + (dimension.amount ? dimension.amount : 0)' + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "123" + parent: "1" + value: Update Number and Amount + xywh: + - 3680 + - 2600 + - 200 + - 80 + labels: {} + - id: 126 + kind: function + ref: composeRecordsReport + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: metrics + source: "" + expr: "" + value: sum(Amount) AS amount + type: String + tests: [] + - target: dimensons + source: "" + expr: '"DATE_FORMAT(created_at, ''%Y-01-01'')"' + value: null + type: String + tests: [] + - target: filter + source: "" + expr: '"(CampaignId = " + campaign.recordID + ") AND (StageName = ''Closed Won'')"' + value: null + type: String + tests: [] + results: + - target: report + source: "" + expr: report + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "126" + parent: "1" + value: Generate Report Won + xywh: + - 3960 + - 2280 + - 200 + - 80 + labels: {} + - id: 127 + kind: expressions + ref: "" + arguments: + - target: NumberOfWonOpportunities + source: "" + expr: "0" + value: null + type: Integer + tests: [] + - target: AmountWonOpportunities + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "127" + parent: "1" + value: Set Number and Amount + xywh: + - 3960 + - 2120 + - 200 + - 80 + labels: {} + - id: 128 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: 'report ? report : []' + value: null + type: Array + tests: [] + results: + - target: dimension + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "128" + parent: "1" + value: Iterate report items + xywh: + - 3960 + - 2440 + - 200 + - 80 + labels: {} + - id: 131 + kind: expressions + ref: "" + arguments: + - target: NumberOfWonOpportunities + source: "" + expr: NumberOfWonOpportunities + dimension.count + value: null + type: Integer + tests: [] + - target: AmountWonOpportunities + source: "" + expr: 'AmountWonOpportunities + (dimension.amount ? dimension.amount : 0)' + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "131" + parent: "1" + value: Update Number and Amount + xywh: + - 3960 + - 2600 + - 200 + - 80 + labels: {} + paths: + - expr: has(campaignIDs, campaignID) + parentid: 26 + childid: 21 + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 26 + childid: 16 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 49 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "59" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 49 + childid: 58 + meta: + name: "" + description: "" + visual: + id: "60" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 58 + childid: 61 + meta: + name: "" + description: "" + visual: + id: "62" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 61 + childid: 63 + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 73 + childid: 75 + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 5 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "91" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 63 + childid: 110 + meta: + name: "" + description: "" + visual: + id: "105" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 63 + childid: 65 + meta: + name: "" + description: "" + visual: + id: "106" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 110 + childid: 104 + meta: + name: "" + description: "" + visual: + id: "111" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 104 + childid: 112 + meta: + name: "" + description: "" + visual: + id: "113" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 112 + childid: 123 + meta: + name: "" + description: "" + visual: + id: "124" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 112 + childid: 127 + meta: + name: "" + description: "" + visual: + id: "125" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 127 + childid: 126 + meta: + name: "" + description: "" + visual: + id: "129" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 126 + childid: 128 + meta: + name: "" + description: "" + visual: + id: "130" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 128 + childid: 131 + meta: + name: "" + description: "" + visual: + id: "132" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 128 + childid: 73 + meta: + name: "" + description: "" + visual: + id: "133" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 14 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "134" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 14 + childid: 49 + meta: + name: "" + description: "" + visual: + id: "135" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End diff --git a/provision/701_service-solution/0001_templates.yaml b/provision/701_service-solution/0001_templates.yaml new file mode 100644 index 000000000..38bb2c31d --- /dev/null +++ b/provision/701_service-solution/0001_templates.yaml @@ -0,0 +1,13 @@ +templates: + case_update_subject: + type: text/plain + template: 'Case: [{{.case.values.Number}}] {{.case.values.Subject}}' + meta: + short: case_update_subject + description: case_update_subject + case_update_content: + type: text/html + template: "

\n Dear {{.contact.values.FirstName}},\n\n We are contacting you with regard to the case \"{{.case.values.Subject}}\".\n \n {{.reason}}\n \n You can reply directly to this email. When replying, please make sure the ticket ID is kept in the subject so we can track your replies.\n \n Kind regards,\n \n The service team\n

" + meta: + short: case_update_content + description: case_update_content diff --git a/provision/701_service-solution/1100_modules.yaml b/provision/701_service-solution/1100_modules.yaml index ed4d4ec3c..4ed685465 100644 --- a/provision/701_service-solution/1100_modules.yaml +++ b/provision/701_service-solution/1100_modules.yaml @@ -878,6 +878,15 @@ modules: PreviousStatus: label: PreviousStatus kind: String + CaseSysTemplate: + label: Case Email Template + kind: Select + default: case_update + options: + options: + - text: Default Case update template + value: case_update + selectType: default Contact: (envoy): { onExisting: "skip" } name: Contact @@ -1618,83 +1627,6 @@ modules: format: "0.00" precision: "2" prefix: $ - EmailMessage: - (envoy): { onExisting: "skip" } - name: EmailMessage - meta: '{}' - fields: - HtmlBody: - label: Body - kind: String - options: - multiLine: true - useRichTextEditor: true - MessageDate: - label: Message Sent Date - kind: String - ContactId: - label: Contact - kind: Record - options: - labelField: RecordLabel - module: Contact - queryFields: - - RecordLabel - selectType: default - Status: - label: Status - kind: Select - options: - options: - - Draft - - Sent - selectType: default - ToAddress: - label: To Address - kind: Email - Subject: - label: Subject - kind: String - EmailTemplateId: - label: Email Template - kind: Record - options: - labelField: Name - module: EmailTemplate - queryFields: - - Name - selectType: default - CaseId: - label: Case - kind: Record - options: - labelField: Number - module: Case - queryFields: - - Number - selectType: default - EmailTemplate: - (envoy): { onExisting: "skip" } - name: EmailTemplate - meta: '{}' - fields: - Name: - label: Email Template Name - kind: String - Subject: - label: Subject - kind: String - Body: - label: Body - kind: String - options: - multiLine: true - useRichTextEditor: true - Description: - label: Description - kind: String - options: - multiLine: true Entitlement: (envoy): { onExisting: "skip" } name: Entitlement @@ -1991,21 +1923,9 @@ modules: format: "0.00" precision: 2 suffix: ' hour(s)' - DefaultSupportChannel: - label: Default support channel id - kind: String DefaultCaseRecordLink: label: Default case link kind: String - DefaultCaseEmailTemplate: - label: Default case email template - kind: Record - options: - labelField: Name - module: EmailTemplate - queryFields: - - Name - selectType: default Update: (envoy): { onExisting: "skip" } name: Update diff --git a/provision/701_service-solution/1400_pages.yaml b/provision/701_service-solution/1400_pages.yaml index 2f37bab4c..fee16e6c8 100644 --- a/provision/701_service-solution/1400_pages.yaml +++ b/provision/701_service-solution/1400_pages.yaml @@ -157,10 +157,11 @@ pages: options: fields: - name: Subject + - name: CaseSysTemplate style: variants: {bodyBg: white, border: success, headerBg: white, headerText: success} kind: Record - xywh: [3, 0, 6, 3] + xywh: [3, 0, 6, 5] - title: Updates options: fields: @@ -184,7 +185,7 @@ pages: style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} kind: RecordList - xywh: [3, 5, 6, 13] + xywh: [3, 5, 6, 11] - title: Related Attachments options: fields: @@ -230,11 +231,13 @@ pages: - enabled: true label: Add Update to this Case resourceType: compose:record - script: /client-scripts/compose/service-solution/Case/AddUpdate.js:default + workflow: ServiceSolution-Case-AddUpdate + stepID: 3 - enabled: true - label: Create email for this Case + label: Send Email for this Case with custom reason resourceType: compose:record - script: /client-scripts/compose/service-solution/Case/CreateEmail.js:default + workflow: ServiceSolution-Case-SendEmail + stepID: 3 sealed: false style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} @@ -630,92 +633,6 @@ pages: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} kind: RecordList xywh: [0, 11, 9, 9] - - title: Emails - options: - allowExport: true - fields: - - name: ToAddress - - name: Subject - - name: HtmlBody - - name: EmailTemplateId - - name: Status - - name: MessageDate - - name: createdAt - module: EmailMessage - page: RecordPageForModuleEmailMessage - perPage: 20 - prefilter: ContactId = ${recordID} - presort: createdAt DESC - style: - variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} - kind: RecordList - xywh: [0, 20, 9, 9] - pages: - - handle: RecordPageForModuleEmailMessage - (envoy): { onExisting: "skip" } - module: EmailMessage - title: Record page for module "Email Message" - blocks: - - title: Message - options: - fields: - - name: Subject - - name: HtmlBody - style: - variants: {bodyBg: white, border: primary, headerBg: white, - headerText: primary} - kind: Record - xywh: [0, 0, 6, 16] - - title: To - options: - fields: - - name: ContactId - - name: CaseId - style: - variants: {bodyBg: white, border: primary, headerBg: white, - headerText: primary} - kind: Record - xywh: [6, 0, 3, 8] - - title: Template - options: - fields: - - name: EmailTemplateId - style: - variants: {bodyBg: white, border: primary, headerBg: white, - headerText: primary} - kind: Record - xywh: [6, 8, 3, 8] - - title: Status - options: - fields: - - name: Status - - name: MessageDate - - name: createdBy - - name: createdAt - style: - variants: {bodyBg: white, border: primary, headerBg: white, - headerText: primary} - kind: Record - xywh: [9, 0, 3, 8] - - title: Actions - options: - buttons: - - enabled: true - label: Load selected template in to email message - variant: primary - resourceType: compose:record - script: /client-scripts/compose/service-solution/EmailMessage/TemplateLoad.js:default - - enabled: true - label: Send email to the contact - variant: success - resourceType: compose:record - script: /client-scripts/compose/service-solution/EmailMessage/SendEmail.js:default - style: - variants: {bodyBg: white, border: primary, headerBg: white, - headerText: primary} - kind: Automation - xywh: [9, 8, 3, 8] - visible: false visible: false visible: true - handle: Entitlements @@ -1365,9 +1282,7 @@ pages: - name: DefaultCostPerHour - name: DefaultDepartment - name: DefaultTimeUpdate - - name: DefaultSupportChannel - name: DefaultCaseRecordLink - - name: DefaultCaseEmailTemplate hideAddButton: true hidePaging: true hideSearch: true @@ -1392,91 +1307,10 @@ pages: - name: DefaultCostPerHour - name: DefaultDepartment - name: DefaultTimeUpdate - - name: DefaultSupportChannel - name: DefaultCaseRecordLink - - name: DefaultCaseEmailTemplate style: variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} kind: Record xywh: [0, 0, 6, 17] visible: false - - handle: EmailTemplates - (envoy): { onExisting: "skip" } - title: Email Templates - blocks: - - title: Email Templates - options: - allowExport: true - draggable: false - editFields: [] - editable: false - fields: - - name: Name - - name: Subject - - name: Description - - name: createdAt - hideRecordCloneButton: true - hideRecordEditButton: false - hideRecordReminderButton: true - hideRecordViewButton: true - module: EmailTemplate - perPage: 20 - prefilter: "" - presort: Name ASC - selectMode: multi - selectable: true - selectionButtons: [] - style: - variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} - kind: RecordList - xywh: [0, 0, 12, 16] - pages: - - handle: RecordPageForModuleEmailTemplate - (envoy): { onExisting: "skip" } - module: EmailTemplate - title: Record page for module "Email Template" - blocks: - - title: Template - options: - fields: - - name: Name - - name: Description - - name: Subject - - name: Body - style: - variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} - kind: Record - xywh: [0, 0, 8, 12] - - title: Other Information - options: - fields: - - name: createdBy - - name: createdAt - - name: updatedBy - - name: updatedAt - style: - variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} - kind: Record - xywh: [8, 0, 4, 12] - - title: Template is used in following emails - options: - allowExport: true - fields: - - name: Subject - - name: CaseId - - name: ContactId - - name: ToAddress - - name: Status - - name: MessageDate - module: EmailMessage - page: RecordPageForModuleEmailMessage - perPage: 20 - prefilter: EmailTemplateId = ${recordID} - presort: createdAt DESC - style: - variants: {bodyBg: white, border: primary, headerBg: white, headerText: primary} - kind: RecordList - xywh: [0, 12, 12, 10] - visible: false - visible: true visible: true diff --git a/provision/701_service-solution/1500_record_settings.yaml b/provision/701_service-solution/1500_record_settings.yaml index 9a7b79280..66fbff710 100644 --- a/provision/701_service-solution/1500_record_settings.yaml +++ b/provision/701_service-solution/1500_record_settings.yaml @@ -5,14 +5,6 @@ records: values: Name: "Service" HourCost: "50" - EmailTemplate: - - (envoy): { skipIf: "!missing" } - values: - Name: "Case Update" - Description: "This is the default case update template" - Subject: "Case: [{{Case.Number}}] {{Case.Subject}}" - Body: |- -

Dear {{Contact.FirstName}},

We are contacting you with regard to the case "{{Case.Subject}}".

ADD_REASON_FOR_CONTACT_HERE

You can reply directly to this email. When replying, please make sure the ticket ID is kept in the subject so we can track your replies.

Kind regards,

The service team

Settings: - (envoy): { skipIf: "!missing" } values: diff --git a/provision/701_service-solution/1600_workflows.yaml b/provision/701_service-solution/1600_workflows.yaml new file mode 100644 index 000000000..af19dfbd5 --- /dev/null +++ b/provision/701_service-solution/1600_workflows.yaml @@ -0,0 +1,4652 @@ +workflows: + ServiceSolution-Contact-SetLabel: + meta: + name: Service Solution - Contact - Set Label + description: Set label for contact record + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 23 + meta: + visual: + edges: + - childID: "23" + meta: + description: "" + label: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Create Contact + xywh: + - 2080 + - 2280 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: module + op: = + values: + - Contact + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 23 + meta: + visual: + edges: + - childID: "23" + meta: + description: "" + label: "" + visual: + id: "40" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: Update Contact + xywh: + - 2080 + - 2440 + - 200 + - 80 + steps: + - id: 23 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + value: Check if First/Last name exists + xywh: + - 2360 + - 2280 + - 200 + - 80 + labels: {} + - id: 41 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.FirstName + ' ' + record.values.LastName + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + value: Assing record.values.RecordLabel + xywh: + - 2840 + - 2120 + - 200 + - 80 + labels: {} + - id: 43 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.FirstName + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + value: Assing record.values.RecordLabel + xywh: + - 2840 + - 2280 + - 200 + - 80 + labels: {} + - id: 45 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.LastName + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "45" + parent: "1" + value: Assing record.values.RecordLabel + xywh: + - 2840 + - 2440 + - 200 + - 80 + labels: {} + - id: 74 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "74" + parent: "1" + value: Check if related Account exists + xywh: + - 3160 + - 2280 + - 200 + - 80 + labels: {} + - id: 76 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + value: null + xywh: + - 3560 + - 2280 + - 200 + - 80 + labels: {} + - id: 78 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.AccountId + value: null + type: ID + tests: [] + results: + - target: accountRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "78" + parent: "1" + value: Get related Account + xywh: + - 3160 + - 2440 + - 200 + - 80 + labels: {} + - id: 85 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "85" + parent: "1" + value: If related Account has AccountName + xywh: + - 3160 + - 2600 + - 200 + - 80 + labels: {} + - id: 86 + kind: expressions + ref: "" + arguments: + - target: record.values.RecordLabel + source: "" + expr: record.values.RecordLabel + " (" + accountRecord.values.AccountName +")" + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "86" + parent: "1" + value: Add AccountName to RecordLabel + xywh: + - 3160 + - 2760 + - 200 + - 80 + labels: {} + paths: + - expr: '(record.values.FirstName ? true : false) && (record.values.LastName ? true : false)' + parentid: 23 + childid: 41 + meta: + name: "" + description: "" + visual: + id: "42" + parent: "1" + points: [] + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - FirstName & LastName' + - expr: 'record.values.FirstName ? true : false' + parentid: 23 + childid: 43 + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + points: + - x: 2712 + "y": 2320 + - x: 2712 + "y": 2320 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Only FirstName ' + - expr: 'record.values.LastName ? true : false' + parentid: 23 + childid: 45 + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#3 - Only LastName' + - expr: '(record.values.AccountId ? true : false)' + parentid: 74 + childid: 78 + meta: + name: "" + description: "" + visual: + id: "79" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 74 + childid: 76 + meta: + name: "" + description: "" + visual: + id: "80" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: '(accountRecord.values.AccountName ? true : false)' + parentid: 85 + childid: 86 + meta: + name: "" + description: "" + visual: + id: "87" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 85 + childid: 76 + meta: + name: "" + description: "" + visual: + id: "89" + parent: "1" + points: + - x: 3660 + "y": 2640 + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 41 + childid: 74 + meta: + name: "" + description: "" + visual: + id: "90" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 43 + childid: 74 + meta: + name: "" + description: "" + visual: + id: "91" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 45 + childid: 74 + meta: + name: "" + description: "" + visual: + id: "92" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 78 + childid: 85 + meta: + name: "" + description: "" + visual: + id: "93" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + ServiceSolution-Case-Prepare: + meta: + name: Service Solution - Case - Prepare + description: Inserts default case values + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module.handle + op: = + values: + - Case + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Case before create + xywh: + - 2040 + - 2040 + - 200 + - 80 + steps: + - id: 3 + kind: expressions + ref: "" + arguments: + - target: record.values.Status + source: "" + expr: 'record.values.Status ? record.values.Status : "New"' + value: null + type: String + tests: [] + - target: record.values.PreviousStatus + source: "" + expr: 'record.values.PreviousStatus ? record.values.PreviousStatus : "New"' + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Set default values + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + ServiceSolution-Update-SendNotifications: + meta: + name: Service Solution - Update - Send Notifications + description: Sends notification about case update + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module.handle + op: = + values: + - Update + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 4 + meta: + visual: + edges: + - childID: "4" + meta: + description: "" + label: "" + visual: + id: "5" + parent: "20" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "20" + value: Before Create Update + xywh: + - 80 + - 40 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: module.handle + op: = + values: + - Update + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 4 + meta: + visual: + edges: + - childID: "4" + meta: + description: "" + label: "" + visual: + id: "6" + parent: "20" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "20" + value: Before Update Update + xywh: + - 80 + - 200 + - 200 + - 80 + steps: + - id: 4 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "4" + parent: "20" + value: Check if incoming mail + xywh: + - 360 + - 40 + - 200 + - 80 + labels: {} + - id: 7 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "20" + value: End + xywh: + - 360 + - 200 + - 200 + - 80 + labels: {} + - id: 11 + kind: expressions + ref: "" + arguments: + - target: record.values.NotificationCaseMailingList + source: "" + expr: 'record.values.SendToMailingList ? 1 : 0' + value: null + type: UnsignedInteger + tests: [] + - target: record.values.NotificationCaseCreator + source: "" + expr: "1" + value: null + type: UnsignedInteger + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "20" + value: Set NotificationCaseCreator AND NotificationCaseMailingList + xywh: + - 760 + - 40 + - 200 + - 80 + labels: {} + - id: 13 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "20" + value: Check Subject and Type + xywh: + - 760 + - 200 + - 200 + - 80 + labels: {} + - id: 15 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "20" + value: End + xywh: + - 1120 + - 40 + - 200 + - 80 + labels: {} + - id: 17 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.CaseId + value: null + type: ID + tests: [] + results: + - target: case + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "21" + value: Get Case + xywh: + - 80 + - 40 + - 200 + - 80 + labels: {} + - id: 20 + kind: visual + ref: swimlane + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Preparation + xywh: + - 2000 + - 1960 + - 1360 + - 320 + labels: {} + - id: 21 + kind: visual + ref: swimlane + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + value: Get Related Contact + xywh: + - 2000 + - 2360 + - 1360 + - 320 + labels: {} + - id: 22 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "22" + parent: "21" + value: Check for contact + xywh: + - 360 + - 40 + - 200 + - 80 + labels: {} + - id: 24 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "24" + parent: "21" + value: End + xywh: + - 360 + - 200 + - 200 + - 80 + labels: {} + - id: 25 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: case.values.ContactId + value: null + type: ID + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "25" + parent: "21" + value: Get Contact + xywh: + - 760 + - 40 + - 200 + - 80 + labels: {} + - id: 28 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "28" + parent: "21" + value: Check for contact Email + xywh: + - 760 + - 200 + - 200 + - 80 + labels: {} + - id: 30 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "30" + parent: "21" + value: End + xywh: + - 1120 + - 40 + - 200 + - 80 + labels: {} + - id: 31 + kind: visual + ref: swimlane + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + value: Compose and send Email + xywh: + - 2000 + - 2760 + - 1360 + - 320 + labels: {} + - id: 32 + kind: expressions + ref: "" + arguments: + - target: subject + source: "" + expr: '"[" + case.values.Number + "] Update: " + case.values.Subject' + value: null + type: String + tests: [] + - target: html1 + source: "" + expr: '"Hi,

"' + value: null + type: String + tests: [] + - target: html2 + source: "" + expr: '"The following case has been updated:
"' + value: null + type: String + tests: [] + - target: html3 + source: "" + expr: '"
"' + value: null + type: String + tests: [] + - target: html8 + source: "" + expr: '"Update:
"' + value: null + type: String + tests: [] + - target: html9 + source: "" + expr: '"
"' + value: null + type: String + tests: [] + - target: html12 + source: "" + expr: '"Kind regards,
"' + value: null + type: String + tests: [] + - target: html13 + source: "" + expr: '"

Service Cloud

--
Ticket Summary:
" + case.values.Description' + value: null + type: String + tests: [] + - target: html + source: "" + expr: html1 + html2 + html3 + html4 + html5 + html6 + html7 + html8 + html9 + html10 + html11 + html12 + html13 + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "32" + parent: "31" + value: Set Email Values + xywh: + - 80 + - 120 + - 200 + - 80 + labels: {} + - id: 37 + kind: function + ref: emailMessage + arguments: + - target: subject + source: "" + expr: subject + value: null + type: String + tests: [] + - target: to + source: "" + expr: contact.values.Email + value: null + type: String + tests: [] + - target: html + source: "" + expr: html + value: null + type: String + tests: [] + results: + - target: email + source: "" + expr: message + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "37" + parent: "31" + value: Make Email + xywh: + - 360 + - 120 + - 200 + - 80 + labels: {} + - id: 39 + kind: function + ref: emailSendMessage + arguments: + - target: message + source: "" + expr: email + value: null + type: EmailMessage + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "39" + parent: "31" + value: Send Email + xywh: + - 640 + - 120 + - 200 + - 80 + labels: {} + paths: + - expr: record.values.Type == "Incoming email" + parentid: 4 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "20" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Incoming mail' + - expr: "" + parentid: 4 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "20" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 11 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "20" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: '(record.values.Subject ? true: false) || (record.values.Type? true: false)' + parentid: 13 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Proceed' + - expr: "" + parentid: 13 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "19" + parent: "20" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No Subject or Type' + - expr: "" + parentid: 17 + childid: 22 + meta: + name: "" + description: "" + visual: + id: "23" + parent: "21" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: 'case.values.ContactId ? true : false' + parentid: 22 + childid: 25 + meta: + name: "" + description: "" + visual: + id: "26" + parent: "21" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - Has Contact' + - expr: "" + parentid: 22 + childid: 24 + meta: + name: "" + description: "" + visual: + id: "27" + parent: "21" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - No contact' + - expr: "" + parentid: 25 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "21" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: 'contact.values.Email ? true : false' + parentid: 28 + childid: 32 + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + points: + - x: 2860 + "y": 2720 + - x: 2180 + "y": 2720 + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has Email' + - expr: "" + parentid: 28 + childid: 30 + meta: + name: "" + description: "" + visual: + id: "34" + parent: "21" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 32 + childid: 37 + meta: + name: "" + description: "" + visual: + id: "38" + parent: "31" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 37 + childid: 39 + meta: + name: "" + description: "" + visual: + id: "40" + parent: "31" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + ServiceSolution-Case-AddUpdate: + meta: + name: Service Solution - Case - Add Update + description: Create update record in CaseUpdate module + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: module.handle + op: = + values: + - Case + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: On Manual Case + xywh: + - 2040 + - 2000 + - 200 + - 80 + steps: + - id: 3 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Get Settings + xywh: + - 2320 + - 2000 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Update + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: update + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Make Case Update + xywh: + - 2600 + - 2000 + - 200 + - 80 + labels: {} + - id: 9 + kind: expressions + ref: "" + arguments: + - target: update.values.CaseId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: update.values.AccountId + source: "" + expr: record.values.AccountId + value: null + type: ID + tests: [] + - target: update.values.ContactId + source: "" + expr: record.values.ContactId + value: null + type: ID + tests: [] + - target: update.values.Department + source: "" + expr: settings.values.DefaultDepartment + value: null + type: ID + tests: [] + - target: update.values.Integer + source: "" + expr: settings.values.DefaultTimeUpdate + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Set Case Update Values + xywh: + - 2040 + - 2160 + - 200 + - 80 + labels: {} + - id: 11 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: update + value: null + type: ComposeRecord + tests: [] + results: + - target: update + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Save Case Update + xywh: + - 2320 + - 2160 + - 200 + - 80 + labels: {} + - id: 13 + kind: prompt + ref: reroute + arguments: + - target: name + source: "" + expr: "" + value: pages.record.edit + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Go to Case Update record editor + xywh: + - 2600 + - 2160 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 7 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 9 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + ServiceSolution-Case-Statuschange: + meta: + name: Service Solution - Case - StatusChange + description: Changes status of case record if previous status is differs from current status + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: afterUpdate + constraints: + - name: module.handle + op: = + values: + - Case + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: After Case Update + xywh: + - 2040 + - 2040 + - 200 + - 80 + steps: + - id: 3 + kind: expressions + ref: "" + arguments: + - target: currentStatus + source: "" + expr: 'record.values.Status ? record.values.Status : "New"' + value: null + type: String + tests: [] + - target: previousStatus + source: "" + expr: 'oldRecord.values.Status ? oldRecord.values.Status : "New"' + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Set Status + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + - id: 5 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Check if status is same + xywh: + - 2600 + - 2040 + - 200 + - 80 + labels: {} + - id: 7 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: null + xywh: + - 3080 + - 2040 + - 200 + - 80 + labels: {} + - id: 9 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Get Settings + xywh: + - 2040 + - 2200 + - 200 + - 80 + labels: {} + - id: 11 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Update + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + results: + - target: update + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Make Case Update + xywh: + - 2320 + - 2200 + - 200 + - 80 + labels: {} + - id: 13 + kind: expressions + ref: "" + arguments: + - target: update.values.CaseId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: update.values.Type + source: "" + expr: '"Status change"' + value: null + type: String + tests: [] + - target: update.values.Subject + source: "" + expr: '"Status changed from " + previousStatus + " to " + currentStatus' + value: null + type: String + tests: [] + - target: update.values.AccountId + source: "" + expr: record.values.AccountId + value: null + type: ID + tests: [] + - target: update.values.ContactId + source: "" + expr: record.values.ContactId + value: null + type: ID + tests: [] + - target: update.values.From + source: "" + expr: '"Automatic message"' + value: null + type: String + tests: [] + - target: update.values.Department + source: "" + expr: settings.values.DefaultDepartment + value: null + type: String + tests: [] + - target: update.values.TimeSpend + source: "" + expr: settings.values.DefaultTimeUpdate + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: Set Case Update Values + xywh: + - 2600 + - 2200 + - 200 + - 80 + labels: {} + - id: 15 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: update + value: null + type: ComposeRecord + tests: [] + results: + - target: update + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + value: Save Case Update + xywh: + - 3080 + - 2200 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 3 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "6" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: currentStatus == previousStatus + parentid: 5 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - No update needed' + - expr: "" + parentid: 5 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Update needed' + - expr: "" + parentid: 9 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 13 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + ServiceSolution-KnowledgeBase-InsertNumber: + meta: + name: Service Solution - Knowledge Base - Insert Number + description: Inserts next Knowledge base number + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: module.handle + op: = + values: + - KnowledgeBase + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 4 + meta: + visual: + edges: + - childID: "4" + meta: + description: "" + label: "" + visual: + id: "5" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Before Create KnowledgeBase + xywh: + - 2040 + - 2040 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: module.handle + op: = + values: + - KnowledgeBase + - name: namespace.handle + op: = + values: + - service-solution + enabled: true + stepID: 4 + meta: + visual: + edges: + - childID: "4" + meta: + description: "" + label: "" + visual: + id: "17" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + parentID: "16" + id: "16" + parent: "1" + value: Before Update KnowledgeBase + xywh: + - 2040 + - 2200 + - 200 + - 80 + steps: + - id: 4 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "4" + parent: "1" + value: Get Settings + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + - id: 7 + kind: expressions + ref: "" + arguments: + - target: record.values.Number + source: "" + expr: 'settings.values.KBNextNumber ? settings.values.KBNextNumber : 0' + value: null + type: Integer + tests: [] + - target: settings.values.KBNextNumber + source: "" + expr: record.values.Number + 1 + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Set next number + xywh: + - 2960 + - 2040 + - 200 + - 80 + labels: {} + - id: 9 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: settings + value: null + type: ComposeRecord + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "9" + parent: "1" + value: Save settings + xywh: + - 2960 + - 2200 + - 200 + - 80 + labels: {} + - id: 11 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Check if has number + xywh: + - 2560 + - 2040 + - 200 + - 80 + labels: {} + - id: 14 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + value: End + xywh: + - 2560 + - 2200 + - 200 + - 80 + labels: {} + paths: + - expr: "" + parentid: 7 + childid: 9 + meta: + name: "" + description: "" + visual: + id: "10" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 4 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: 'record.values.Number ? false : true' + parentid: 11 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#1 - No number' + - expr: "" + parentid: 11 + childid: 14 + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Has number' + ServiceSolution-Update-SetCaseTimeAndCost: + meta: + name: Service Solution - Update - Set Case Time And Cost + description: Sets time and cost of a case by summing up the cost of all case updates + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: beforeUpdate + constraints: + - name: namespace.handle + op: = + values: + - service-solution + - name: module.handle + op: = + values: + - Update + enabled: true + stepID: 4 + meta: + visual: + edges: + - childID: "4" + meta: + description: "" + label: "" + visual: + id: "6" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0; + value: null + parentID: "3" + id: "3" + parent: "1" + value: Before Update Update + xywh: + - 2040 + - 2160 + - 200 + - 80 + - resourceType: compose:record + eventType: beforeCreate + constraints: + - name: namespace.handle + op: = + values: + - service-solution + - name: module.handle + op: = + values: + - Update + enabled: true + stepID: 4 + meta: + visual: + edges: + - childID: "4" + meta: + description: "" + label: "" + visual: + id: "5" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: Before Update Create + xywh: + - 2040 + - 2040 + - 200 + - 80 + steps: + - id: 4 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "4" + parent: "1" + value: Check Update Department + xywh: + - 2320 + - 2040 + - 200 + - 80 + labels: {} + - id: 8 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Department + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.Department + value: null + type: ID + tests: [] + results: + - target: departmentRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "8" + parent: "1" + value: Fetch Department + xywh: + - 2040 + - 2320 + - 200 + - 80 + labels: {} + - id: 11 + kind: expressions + ref: "" + arguments: + - target: record.values.Cost + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Set Update Cost + xywh: + - 2760 + - 2040 + - 200 + - 80 + labels: {} + - id: 15 + kind: expressions + ref: "" + arguments: + - target: time + source: "" + expr: 'record.values.TimeSpend ? record.values.TimeSpend : 0' + value: null + type: Integer + tests: [] + - target: cost + source: "" + expr: 'departmentRecord.values.HourCost ? departmentRecord.values.HourCost : 0' + value: null + type: Float + tests: [] + - target: record.values.Cost + source: "" + expr: time * cost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + value: Set Cost & Time + xywh: + - 2320 + - 2320 + - 200 + - 80 + labels: {} + - id: 17 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.CaseId + value: null + type: ID + tests: [] + results: + - target: caseRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "17" + parent: "1" + value: Fetch Case + xywh: + - 2760 + - 2320 + - 200 + - 80 + labels: {} + - id: 20 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Update + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: query + source: "" + expr: '"(CaseId = " + record.values.CaseId + " AND (recordID != " + record.recordID + ")"' + value: null + type: String + tests: [] + results: + - target: updates + source: "" + expr: records + value: null + type: "" + tests: [] + - target: numOfUpdates + source: "" + expr: total + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Fetch related Updates + xywh: + - 2040 + - 2560 + - 200 + - 80 + labels: {} + - id: 22 + kind: expressions + ref: "" + arguments: + - target: updates + source: "" + expr: push(updates, record) + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "22" + parent: "1" + value: Add current Update to updates + xywh: + - 2280 + - 2560 + - 200 + - 80 + labels: {} + - id: 24 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: updates + value: null + type: Array + tests: [] + results: + - target: update + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "24" + parent: "1" + value: Iterate over Updates + xywh: + - 2760 + - 2560 + - 200 + - 80 + labels: {} + - id: 26 + kind: expressions + ref: "" + arguments: + - target: caseRecord.values.TotalTime + source: "" + expr: caseTime + value: null + type: Integer + tests: [] + - target: caseRecord.values.TotalCost + source: "" + expr: caseCost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: Sate Case TotalTime/Cost + xywh: + - 2760 + - 2720 + - 200 + - 80 + labels: {} + - id: 28 + kind: expressions + ref: "" + arguments: + - target: caseUpdateTime + source: "" + expr: 'update.values.TimeSpend ? update.values.TimeSpend : 0' + value: null + type: Integer + tests: [] + - target: caseTime + source: "" + expr: caseTime + caseUpdateTime + value: null + type: Integer + tests: [] + - target: caseUpdateCost + source: "" + expr: 'update.values.Cost ? update.values.Cost : 0' + value: null + type: Float + tests: [] + - target: caseCost + source: "" + expr: caseCost + caseUpdateCost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + value: Set Time & Cost + xywh: + - 2040 + - 2720 + - 200 + - 80 + labels: {} + - id: 31 + kind: expressions + ref: "" + arguments: + - target: caseTime + source: "" + expr: "0" + value: null + type: Integer + tests: [] + - target: caseCost + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + value: Init caseTime & caseCost + xywh: + - 2520 + - 2560 + - 200 + - 80 + labels: {} + - id: 34 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: caseRecord + value: null + type: ComposeRecord + tests: [] + results: + - target: caseRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "34" + parent: "1" + value: Save Case + xywh: + - 2520 + - 2720 + - 200 + - 80 + labels: {} + - id: 36 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + value: Check Account + xywh: + - 2280 + - 2720 + - 200 + - 80 + labels: {} + - id: 38 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Account + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: caseRecord.values.AccountId + value: null + type: ID + tests: [] + results: + - target: accountRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "38" + parent: "1" + value: Fetch Account + xywh: + - 2040 + - 2880 + - 200 + - 80 + labels: {} + - id: 40 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "40" + parent: "1" + value: Check Product + xywh: + - 2320 + - 3000 + - 200 + - 80 + labels: {} + - id: 42 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: query + source: "" + expr: '"AccountId = " + accountRecord.recordID' + value: null + type: String + tests: [] + results: + - target: cases + source: "" + expr: records + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "42" + parent: "1" + value: Fetch Cases + xywh: + - 2040 + - 3000 + - 200 + - 80 + labels: {} + - id: 44 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: cases + value: null + type: Array + tests: [] + results: + - target: case + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + value: Iterate over Cases + xywh: + - 2040 + - 3240 + - 200 + - 80 + labels: {} + - id: 46 + kind: expressions + ref: "" + arguments: + - target: caseTime + source: "" + expr: "0" + value: null + type: Integer + tests: [] + - target: caseCost + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + value: Set caseTime & caseCost + xywh: + - 2040 + - 3120 + - 200 + - 80 + labels: {} + - id: 49 + kind: expressions + ref: "" + arguments: + - target: caseUpdateTime + source: "" + expr: 'case.values.TotalTime ? case.values.TotalTime : 0' + value: null + type: Integer + tests: [] + - target: caseTime + source: "" + expr: caseTime + caseUpdateTime + value: null + type: Integer + tests: [] + - target: caseUpdateCost + source: "" + expr: 'case.values.TotalCost ? case.values.TotalCost : 0' + value: null + type: Float + tests: [] + - target: caseCost + source: "" + expr: 'caseCost + caseUpdateCost ' + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "49" + parent: "1" + value: Sum up account totals + xywh: + - 2040 + - 3400 + - 200 + - 80 + labels: {} + - id: 52 + kind: expressions + ref: "" + arguments: + - target: accountRecord.values.TotalTime + source: "" + expr: caseTime + value: null + type: Integer + tests: [] + - target: accountRecord.values.TotalCost + source: "" + expr: caseCost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "52" + parent: "1" + value: Update the values + xywh: + - 2320 + - 3400 + - 200 + - 80 + labels: {} + - id: 55 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: accountRecord + value: null + type: ComposeRecord + tests: [] + results: + - target: accountRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "55" + parent: "1" + value: Save Account record + xywh: + - 2320 + - 3240 + - 200 + - 80 + labels: {} + - id: 58 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "58" + parent: "1" + value: Check departmentRecord + xywh: + - 2560 + - 3400 + - 200 + - 80 + labels: {} + - id: 59 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Case + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: query + source: "" + expr: '"ProductId = " + productRecord.recordID' + value: null + type: String + tests: [] + results: + - target: cases + source: "" + expr: records + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "59" + parent: "1" + value: Fetch Cases + xywh: + - 2760 + - 2840 + - 200 + - 80 + labels: {} + - id: 64 + kind: expressions + ref: "" + arguments: + - target: caseTime + source: "" + expr: "0" + value: null + type: Integer + tests: [] + - target: caseCost + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "64" + parent: "1" + value: Set caseTime & caseCost + xywh: + - 2760 + - 3000 + - 200 + - 80 + labels: {} + - id: 66 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: cases + value: null + type: Array + tests: [] + results: + - target: case + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "66" + parent: "1" + value: Iterate over Cases + xywh: + - 2760 + - 3120 + - 200 + - 80 + labels: {} + - id: 70 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Product + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: caseRecord.values.ProductId + value: null + type: ID + tests: [] + results: + - target: product + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "70" + parent: "1" + value: Fetch Product + xywh: + - 2520 + - 2840 + - 200 + - 80 + labels: {} + - id: 73 + kind: expressions + ref: "" + arguments: + - target: caseUpdateTime + source: "" + expr: 'case.values.TotalTime ? case.values.TotalTime : 0' + value: null + type: Integer + tests: [] + - target: caseTime + source: "" + expr: caseTime + caseUpdateTime + value: null + type: Integer + tests: [] + - target: caseUpdateCost + source: "" + expr: 'case.values.TotalCost ? case.values.TotalCost : 0' + value: null + type: Float + tests: [] + - target: caseCost + source: "" + expr: 'caseCost + caseUpdateCost ' + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "73" + parent: "1" + value: Sum up account totals + xywh: + - 3120 + - 3120 + - 200 + - 80 + labels: {} + - id: 75 + kind: expressions + ref: "" + arguments: + - target: product.values.TotalTime + source: "" + expr: caseTime + value: null + type: Integer + tests: [] + - target: product.values.TotalCost + source: "" + expr: caseCost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "75" + parent: "1" + value: Update values + xywh: + - 2760 + - 3280 + - 200 + - 80 + labels: {} + - id: 77 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: product + value: null + type: ComposeRecord + tests: [] + results: + - target: product + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "77" + parent: "1" + value: Save Product + xywh: + - 3120 + - 3280 + - 200 + - 80 + labels: {} + - id: 82 + kind: termination + ref: "" + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "82" + parent: "1" + value: End + xywh: + - 3120 + - 3520 + - 200 + - 80 + labels: {} + - id: 86 + kind: function + ref: composeRecordsSearch + arguments: + - target: module + source: "" + expr: "" + value: Update + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: query + source: "" + expr: '"(Department = " + record.values.Department + ") AND (" + recordID + " != " + record.recordID +")"' + value: null + type: String + tests: [] + results: + - target: updates + source: "" + expr: records + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "86" + parent: "1" + value: Fetch Updates + xywh: + - 2040 + - 3640 + - 200 + - 80 + labels: {} + - id: 87 + kind: expressions + ref: "" + arguments: + - target: updates + source: "" + expr: push(updates, record) + value: null + type: Array + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "87" + parent: "1" + value: Add current Update to updates + xywh: + - 2280 + - 3640 + - 200 + - 80 + labels: {} + - id: 89 + kind: expressions + ref: "" + arguments: + - target: departmentTime + source: "" + expr: "0" + value: null + type: Integer + tests: [] + - target: departmentCost + source: "" + expr: "0" + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "89" + parent: "1" + value: Init departmentTime & departmentCost + xywh: + - 2520 + - 3640 + - 200 + - 80 + labels: {} + - id: 91 + kind: iterator + ref: loopEach + arguments: + - target: items + source: "" + expr: updates + value: null + type: Array + tests: [] + results: + - target: update + source: "" + expr: item + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "91" + parent: "1" + value: Iterate over Updates + xywh: + - 2760 + - 3640 + - 200 + - 80 + labels: {} + - id: 93 + kind: expressions + ref: "" + arguments: + - target: departmentUpdateTime + source: "" + expr: 'update.values.TimeSpend ? update.values.TimeSpend : 0' + value: null + type: Integer + tests: [] + - target: departmentTime + source: "" + expr: departmentTime + departmentUpdateTime + value: null + type: Integer + tests: [] + - target: departmentUpdateCost + source: "" + expr: 'update.values.Cost ? update.values.Cost: 0' + value: null + type: Float + tests: [] + - target: departmentCost + source: "" + expr: departmentCost + departmentUpdateCost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "93" + parent: "1" + value: Sum up the totals for this department + xywh: + - 3120 + - 3632 + - 200 + - 80 + labels: {} + - id: 96 + kind: expressions + ref: "" + arguments: + - target: departmentRecord.values.TotalTime + source: "" + expr: departmentTime + value: null + type: Integer + tests: [] + - target: departmentRecord.values.TotalCost + source: "" + expr: departmentCost + value: null + type: Float + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "96" + parent: "1" + value: Set the values in the department + xywh: + - 2760 + - 3800 + - 200 + - 80 + labels: {} + - id: 97 + kind: function + ref: composeRecordsUpdate + arguments: + - target: record + source: "" + expr: departmentRecord + value: null + type: ComposeRecord + tests: [] + results: + - target: departmentRecord + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "97" + parent: "1" + value: Save departmentRecord + xywh: + - 3120 + - 3800 + - 200 + - 80 + labels: {} + paths: + - expr: 'record.values.Department ? true : false' + parentid: 4 + childid: 8 + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + points: + - x: 2420 + "y": 2280 + - x: 2140 + "y": 2280 + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has Department' + - expr: "" + parentid: 4 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No Department' + - expr: "" + parentid: 8 + childid: 15 + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 15 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "18" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 11 + childid: 17 + meta: + name: "" + description: "" + visual: + id: "19" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 17 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 20 + childid: 22 + meta: + name: "" + description: "" + visual: + id: "23" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 24 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 24 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "30" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 22 + childid: 31 + meta: + name: "" + description: "" + visual: + id: "32" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 31 + childid: 24 + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 26 + childid: 34 + meta: + name: "" + description: "" + visual: + id: "35" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 34 + childid: 36 + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + points: [] + style: exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: 'caseRecord.values.AccountId ? true : false' + parentid: 36 + childid: 38 + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + points: [] + style: exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 36 + childid: 40 + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + points: [] + style: exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 38 + childid: 42 + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 42 + childid: 46 + meta: + name: "" + description: "" + visual: + id: "47" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 46 + childid: 44 + meta: + name: "" + description: "" + visual: + id: "48" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 44 + childid: 49 + meta: + name: "" + description: "" + visual: + id: "53" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 44 + childid: 52 + meta: + name: "" + description: "" + visual: + id: "54" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 52 + childid: 55 + meta: + name: "" + description: "" + visual: + id: "56" + parent: "1" + points: [] + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 55 + childid: 40 + meta: + name: "" + description: "" + visual: + id: "57" + parent: "1" + points: [] + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + - expr: caseRecord.values.ProductId + parentid: 40 + childid: 70 + meta: + name: "" + description: "" + visual: + id: "60" + parent: "1" + points: [] + style: exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 40 + childid: 58 + meta: + name: "" + description: "" + visual: + id: "61" + parent: "1" + points: [] + style: exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 59 + childid: 64 + meta: + name: "" + description: "" + visual: + id: "65" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 64 + childid: 66 + meta: + name: "" + description: "" + visual: + id: "67" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 70 + childid: 59 + meta: + name: "" + description: "" + visual: + id: "72" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 66 + childid: 73 + meta: + name: "" + description: "" + visual: + id: "74" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 66 + childid: 75 + meta: + name: "" + description: "" + visual: + id: "76" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 75 + childid: 77 + meta: + name: "" + description: "" + visual: + id: "78" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 77 + childid: 58 + meta: + name: "" + description: "" + visual: + id: "79" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 58 + childid: 86 + meta: + name: "" + description: "" + visual: + id: "81" + parent: "1" + points: [] + style: exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - If' + - expr: "" + parentid: 58 + childid: 82 + meta: + name: "" + description: "" + visual: + id: "83" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - Else (if)' + - expr: "" + parentid: 86 + childid: 87 + meta: + name: "" + description: "" + visual: + id: "88" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 87 + childid: 89 + meta: + name: "" + description: "" + visual: + id: "90" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 89 + childid: 91 + meta: + name: "" + description: "" + visual: + id: "92" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 91 + childid: 93 + meta: + name: "" + description: "" + visual: + id: "95" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: Body + - expr: "" + parentid: 91 + childid: 96 + meta: + name: "" + description: "" + visual: + id: "98" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: End + - expr: "" + parentid: 96 + childid: 97 + meta: + name: "" + description: "" + visual: + id: "99" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 97 + childid: 82 + meta: + name: "" + description: "" + visual: + id: "100" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0; + value: null + ServiceSolution-Case-SendEmail: + meta: + name: Service Solution - Case - Send Email + description: Sends Case update Email based on prompted reason and selected template + enabled: true + keepSessions: 0 + triggers: + - resourceType: compose:record + eventType: onManual + constraints: + - name: namespace.handle + op: = + values: + - service-solution + - name: module.handle + op: = + values: + - Case + enabled: true + stepID: 3 + meta: + visual: + edges: + - childID: "3" + meta: + description: "" + label: "" + visual: + id: "4" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + parentID: "2" + id: "2" + parent: "1" + value: On Manual Case + xywh: + - 2040 + - 2000 + - 200 + - 80 + steps: + - id: 3 + kind: prompt + ref: input + arguments: + - target: title + source: "" + expr: "" + value: Reason + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: info + type: String + tests: [] + - target: message + source: "" + expr: "" + value: What is the message you want to send to the person that opened this case? + type: String + tests: [] + - target: type + source: "" + expr: "" + value: text + type: String + tests: [] + results: + - target: reason + source: "" + expr: value + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "3" + parent: "1" + value: Prompt for reason + xywh: + - 2280 + - 2000 + - 200 + - 80 + labels: {} + - id: 5 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: record.values.CaseSysTemplate + "_subject" + value: null + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: subject + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/plain + type: String + tests: [] + - target: variables + source: "" + expr: subjectRenderVariables + value: null + type: Vars + tests: [] + results: + - target: subject + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "5" + parent: "1" + value: Get Email Subject + xywh: + - 2520 + - 2160 + - 200 + - 80 + labels: {} + - id: 7 + kind: function + ref: templatesRender + arguments: + - target: lookup + source: "" + expr: record.values.CaseSysTemplate + "_content" + value: null + type: Handle + tests: [] + - target: documentName + source: "" + expr: "" + value: content + type: String + tests: [] + - target: documentType + source: "" + expr: "" + value: text/html + type: String + tests: [] + - target: variables + source: "" + expr: contentRenderVariables + value: null + type: Vars + tests: [] + results: + - target: content + source: "" + expr: document + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "7" + parent: "1" + value: Get Email Content + xywh: + - 3000 + - 2160 + - 200 + - 80 + labels: {} + - id: 11 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "11" + parent: "1" + value: Check if contact exists + xywh: + - 2520 + - 2000 + - 200 + - 80 + labels: {} + - id: 12 + kind: function + ref: composeRecordsLookup + arguments: + - target: module + source: "" + expr: "" + value: Contact + type: Handle + tests: [] + - target: namespace + source: "" + expr: "" + value: service-solution + type: Handle + tests: [] + - target: record + source: "" + expr: record.values.ContactId + value: null + type: ID + tests: [] + results: + - target: contact + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "12" + parent: "1" + value: Get Contact + xywh: + - 2040 + - 2160 + - 200 + - 80 + labels: {} + - id: 13 + kind: prompt + ref: notification + arguments: + - target: title + source: "" + expr: "" + value: Warning + type: String + tests: [] + - target: message + source: "" + expr: "" + value: Assign Contact to Case in order to send an Email message + type: String + tests: [] + - target: variant + source: "" + expr: "" + value: warning + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "13" + parent: "1" + value: 'Warning: No contact' + xywh: + - 2920 + - 2000 + - 200 + - 80 + labels: {} + - id: 20 + kind: function + ref: emailSend + arguments: + - target: subject + source: "" + expr: subject.document + value: null + type: Reader + tests: [] + - target: to + source: "" + expr: contact.values.Email + value: null + type: String + tests: [] + - target: html + source: "" + expr: content.document + value: null + type: Reader + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "20" + parent: "1" + value: Send email + xywh: + - 2040 + - 2320 + - 200 + - 80 + labels: {} + - id: 26 + kind: gateway + ref: excl + arguments: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "26" + parent: "1" + value: Check CaseId + xywh: + - 2520 + - 2320 + - 200 + - 80 + labels: {} + - id: 28 + kind: function + ref: composeRecordsLast + arguments: + - target: module + source: "" + expr: "" + value: Settings + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: settings + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "28" + parent: "1" + value: Get Settings + xywh: + - 2040 + - 2480 + - 200 + - 80 + labels: {} + - id: 29 + kind: prompt + ref: recordPage + arguments: + - target: module + source: "" + expr: module + value: null + type: ComposeModule + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + - target: record + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "29" + parent: "1" + value: Go to record viewer + xywh: + - 2920 + - 2320 + - 200 + - 80 + labels: {} + - id: 32 + kind: function + ref: composeRecordsNew + arguments: + - target: module + source: "" + expr: "" + value: Update + type: Handle + tests: [] + - target: namespace + source: "" + expr: namespace + value: null + type: ComposeNamespace + tests: [] + results: + - target: update + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "32" + parent: "1" + value: Make Case Update + xywh: + - 2280 + - 2480 + - 200 + - 80 + labels: {} + - id: 34 + kind: expressions + ref: "" + arguments: + - target: update.values.CaseId + source: "" + expr: record.recordID + value: null + type: ID + tests: [] + - target: update.values.Type + source: "" + expr: '"Outgoing email"' + value: null + type: String + tests: [] + - target: update.values.Subject + source: "" + expr: '"Email: " + record.values.Subject' + value: null + type: String + tests: [] + - target: update.values.ContactId + source: "" + expr: record.values.ContactId + value: null + type: ID + tests: [] + - target: update.values.From + source: "" + expr: '"Service Solution"' + value: null + type: String + tests: [] + - target: update.values.To + source: "" + expr: contact.values.Email + value: null + type: String + tests: [] + - target: update.values.Content + source: "" + expr: "" + value: null + type: String + tests: [] + - target: update.values.Department + source: "" + expr: 'settings.values.DefaultDepartment ? settings.values.DefaultDepartment : ""' + value: null + type: ID + tests: [] + - target: update.values.TimeSpend + source: "" + expr: settings.values.DefaultTimeUpdate + value: null + type: Integer + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "34" + parent: "1" + value: Set Case Update Values + xywh: + - 2520 + - 2480 + - 200 + - 80 + labels: {} + - id: 36 + kind: function + ref: composeRecordsCreate + arguments: + - target: record + source: "" + expr: update + value: null + type: ComposeRecord + tests: [] + results: + - target: update + source: "" + expr: record + value: null + type: "" + tests: [] + meta: + name: "" + description: "" + visual: + id: "36" + parent: "1" + value: Create Case Update + xywh: + - 2920 + - 2480 + - 200 + - 80 + labels: {} + - id: 39 + kind: expressions + ref: "" + arguments: + - target: subjectRenderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: subjectRenderVariables.case + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "39" + parent: "1" + value: Set Subject Render Variables + xywh: + - 2280 + - 2160 + - 200 + - 80 + labels: {} + - id: 43 + kind: expressions + ref: "" + arguments: + - target: contentRenderVariables + source: "" + expr: "" + value: null + type: Vars + tests: [] + - target: contentRenderVariables.case + source: "" + expr: record + value: null + type: ComposeRecord + tests: [] + - target: contentRenderVariables.contact + source: "" + expr: contact + value: null + type: ComposeRecord + tests: [] + - target: contentRenderVariables.reason + source: "" + expr: reason + value: null + type: String + tests: [] + results: [] + meta: + name: "" + description: "" + visual: + id: "43" + parent: "1" + value: Set Content Render Variables + xywh: + - 2760 + - 2160 + - 200 + - 80 + labels: {} + paths: + - expr: 'record.values.ContactId ? true : false' + parentid: 11 + childid: 12 + meta: + name: "" + description: "" + visual: + id: "14" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Has Contact' + - expr: "" + parentid: 11 + childid: 13 + meta: + name: "" + description: "" + visual: + id: "15" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No Contact' + - expr: "" + parentid: 3 + childid: 11 + meta: + name: "" + description: "" + visual: + id: "16" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 7 + childid: 20 + meta: + name: "" + description: "" + visual: + id: "21" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: null + - expr: 'record.recordID ? true : false' + parentid: 26 + childid: 28 + meta: + name: "" + description: "" + visual: + id: "30" + parent: "1" + points: [] + style: exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0; + value: '#1 - Create Case Update' + - expr: "" + parentid: 26 + childid: 29 + meta: + name: "" + description: "" + visual: + id: "31" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: '#2 - No Case' + - expr: "" + parentid: 28 + childid: 32 + meta: + name: "" + description: "" + visual: + id: "33" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 32 + childid: 34 + meta: + name: "" + description: "" + visual: + id: "35" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 34 + childid: 36 + meta: + name: "" + description: "" + visual: + id: "37" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 36 + childid: 29 + meta: + name: "" + description: "" + visual: + id: "38" + parent: "1" + points: [] + style: exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 12 + childid: 39 + meta: + name: "" + description: "" + visual: + id: "41" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 39 + childid: 5 + meta: + name: "" + description: "" + visual: + id: "44" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 5 + childid: 43 + meta: + name: "" + description: "" + visual: + id: "45" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 43 + childid: 7 + meta: + name: "" + description: "" + visual: + id: "46" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null + - expr: "" + parentid: 20 + childid: 26 + meta: + name: "" + description: "" + visual: + id: "47" + parent: "1" + points: [] + style: exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; + value: null diff --git a/provision/update.sh b/provision/update.sh index 64f2be6c5..2c0950420 100755 --- a/provision/update.sh +++ b/provision/update.sh @@ -32,17 +32,21 @@ function cleanup { download +copyExtConfig 700 crm 0001_templates copyExtConfig 700 crm 1000_namespace copyExtConfig 700 crm 1100_modules copyExtConfig 700 crm 1200_charts copyExtConfig 700 crm 1400_pages copyExtConfig 700 crm 1500_record_settings +copyExtConfig 700 crm 1600_workflows +copyExtConfig 701 service-solution 0001_templates copyExtConfig 701 service-solution 1000_namespace copyExtConfig 701 service-solution 1100_modules copyExtConfig 701 service-solution 1200_charts copyExtConfig 701 service-solution 1400_pages copyExtConfig 701 service-solution 1500_record_settings +copyExtConfig 701 service-solution 1600_workflows cleanup