Created
September 28, 2017 04:24
-
-
Save alexed1/c7e7d3cf5e20c2d1dd799eacf317bde1 to your computer and use it in GitHub Desktop.
test flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fullName": "NBADemoV2_1-18", | |
"actionCalls": [{ | |
"name": "Get_Churn_From_AWS_Lambda_v3", | |
"label": "Get Churn From AWS Lambda", | |
"locationX": "526", | |
"locationY": "254", | |
"actionName": "GetChurnFromAWSLambdav3_customer_custId_churnGET__Service", | |
"actionType": "apex", | |
"inputParameters": { | |
"name": "custId", | |
"value": { | |
"stringValue": "33" | |
} | |
}, | |
"outputParameters": { | |
"assignToReference": "churnPropensity", | |
"name": "customer_custId_churnGET_output" | |
} | |
}, { | |
"name": "Get_Customer_Status", | |
"label": "Get Customer Status", | |
"locationX": "29", | |
"locationY": "217", | |
"actionName": "GetCustomerBillingStatus_customer_custId_GET__Service", | |
"actionType": "apex", | |
"connector": { | |
"targetReference": "Post_to_TestConsole_0_0" | |
}, | |
"inputParameters": { | |
"name": "custId", | |
"value": { | |
"elementReference": "Customer_AccountId" | |
} | |
}, | |
"outputParameters": { | |
"assignToReference": "customerStatus", | |
"name": "customer_custId_GET_output" | |
} | |
}, { | |
"name": "GetAWSChurnV4", | |
"label": "GetAWSChurnV4", | |
"locationX": "671", | |
"locationY": "252", | |
"actionName": "GetAWSChurnV4_customer_custId_churnGET__Service", | |
"actionType": "apex", | |
"inputParameters": { | |
"name": "custId", | |
"value": { | |
"stringValue": "43" | |
} | |
}, | |
"outputParameters": { | |
"assignToReference": "churnPropensity", | |
"name": "customer_custId_churnGET_output" | |
} | |
}, { | |
"name": "GetAWSv5", | |
"label": "GetAWSv5", | |
"locationX": "399", | |
"locationY": "250", | |
"actionName": "GetAWSChurnV5_customer_99_churnGET__Service", | |
"actionType": "apex", | |
"inputParameters": { | |
"name": "custId", | |
"value": { | |
"stringValue": "55" | |
} | |
}, | |
"outputParameters": { | |
"assignToReference": "churnPropensity", | |
"name": "customer_99_churnGET_output" | |
} | |
}, { | |
"name": "Post_to_TestConsole", | |
"label": "Post to TestConsole", | |
"locationX": "533", | |
"locationY": "576", | |
"actionName": "chatterPost", | |
"actionType": "chatterPost", | |
"connector": { | |
"targetReference": "Publish_PropositionGenerated_Event" | |
}, | |
"inputParameters": [{ | |
"name": "subjectNameOrId", | |
"value": { | |
"stringValue": "group_edelstein" | |
} | |
}, { | |
"name": "text", | |
"value": { | |
"elementReference": "Variables" | |
} | |
}, { | |
"name": "type", | |
"value": { | |
"stringValue": "Group" | |
} | |
}], | |
"outputParameters": { | |
"assignToReference": "Feed_ID", | |
"name": "feedItemId" | |
} | |
}, { | |
"name": "Post_to_TestConsole_0", | |
"label": "Post to TestConsole", | |
"locationX": "162", | |
"locationY": "128", | |
"actionName": "chatterPost", | |
"actionType": "chatterPost", | |
"connector": { | |
"targetReference": "customer_status" | |
}, | |
"inputParameters": [{ | |
"name": "subjectNameOrId", | |
"value": { | |
"stringValue": "group_edelstein" | |
} | |
}, { | |
"name": "text", | |
"value": { | |
"stringValue": "flow triggered" | |
} | |
}, { | |
"name": "type", | |
"value": { | |
"stringValue": "Group" | |
} | |
}], | |
"outputParameters": { | |
"assignToReference": "Feed_ID", | |
"name": "feedItemId" | |
} | |
}, { | |
"name": "Post_to_TestConsole_0_0", | |
"label": "Post to TestConsole", | |
"locationX": "203", | |
"locationY": "333", | |
"actionName": "chatterPost", | |
"actionType": "chatterPost", | |
"connector": { | |
"targetReference": "Evaluate_Customer_Status" | |
}, | |
"inputParameters": [{ | |
"name": "subjectNameOrId", | |
"value": { | |
"stringValue": "group_edelstein" | |
} | |
}, { | |
"name": "text", | |
"value": { | |
"elementReference": "CustomerStatusSentence" | |
} | |
}, { | |
"name": "type", | |
"value": { | |
"stringValue": "Group" | |
} | |
}], | |
"outputParameters": { | |
"assignToReference": "Feed_ID", | |
"name": "feedItemId" | |
} | |
}, { | |
"name": "Post_to_TestConsole_0_0_0", | |
"label": "Post to TestConsole", | |
"locationX": "28", | |
"locationY": "598", | |
"actionName": "chatterPost", | |
"actionType": "chatterPost", | |
"connector": { | |
"targetReference": "Evaluate_Churn_Risk" | |
}, | |
"inputParameters": [{ | |
"name": "subjectNameOrId", | |
"value": { | |
"stringValue": "group_edelstein" | |
} | |
}, { | |
"name": "text", | |
"value": { | |
"stringValue": "return from aws status" | |
} | |
}, { | |
"name": "type", | |
"value": { | |
"stringValue": "Group" | |
} | |
}], | |
"outputParameters": { | |
"assignToReference": "Feed_ID", | |
"name": "feedItemId" | |
} | |
}], | |
"assignments": [{ | |
"name": "customer_status", | |
"label": "customer status", | |
"locationX": "169", | |
"locationY": "228", | |
"assignmentItems": [{ | |
"assignToReference": "Customer_AccountId", | |
"operator": "Assign", | |
"value": { | |
"stringValue": "45" | |
} | |
}, { | |
"assignToReference": "curCustomer.Name", | |
"operator": "Assign", | |
"value": { | |
"stringValue": "78" | |
} | |
}], | |
"connector": { | |
"targetReference": "Get_Customer_Status" | |
} | |
}, { | |
"name": "customer_status_0", | |
"label": "customer status", | |
"locationX": "103", | |
"locationY": "508", | |
"assignmentItems": { | |
"assignToReference": "churnPropensity", | |
"operator": "Assign", | |
"value": { | |
"stringValue": ".75" | |
} | |
}, | |
"connector": { | |
"targetReference": "Post_to_TestConsole_0_0_0" | |
} | |
}], | |
"constants": { | |
"name": "tempconst", | |
"dataType": "String", | |
"value": { | |
"stringValue": "43" | |
} | |
}, | |
"decisions": [{ | |
"name": "Evaluate_Churn_Risk", | |
"label": "Evaluate Churn Risk", | |
"locationX": "17", | |
"locationY": "712", | |
"defaultConnector": { | |
"targetReference": "Select_General_Proposition" | |
}, | |
"defaultConnectorLabel": "Churn Risk Below .40", | |
"rules": [{ | |
"name": "Highest_Churn_Risk", | |
"conditionLogic": "and", | |
"conditions": { | |
"leftValueReference": "churn_propensity_as_number", | |
"operator": "GreaterThan", | |
"rightValue": { | |
"numberValue": "0.8" | |
} | |
}, | |
"connector": { | |
"targetReference": "Select_Highest_Churn_Risk_Proposition" | |
}, | |
"label": "Highest Churn Risk" | |
}, { | |
"name": "High_Churn_Risk", | |
"conditionLogic": "and", | |
"conditions": { | |
"leftValueReference": "churn_propensity_as_number", | |
"operator": "GreaterThanOrEqualTo", | |
"rightValue": { | |
"numberValue": "0.6" | |
} | |
}, | |
"connector": { | |
"targetReference": "Select_High_Churn_Risk_Proposition" | |
}, | |
"label": "High Churn Risk" | |
}, { | |
"name": "Medium_Churn_Risk", | |
"conditionLogic": "and", | |
"conditions": { | |
"leftValueReference": "churn_propensity_as_number", | |
"operator": "GreaterThan", | |
"rightValue": { | |
"numberValue": "0.4" | |
} | |
}, | |
"connector": { | |
"targetReference": "Select_Medium_Churn_Risk_Proposition" | |
}, | |
"label": "Medium Churn Risk" | |
}] | |
}, { | |
"name": "Evaluate_Customer_Status", | |
"label": "Evaluate Customer Status", | |
"locationX": "72", | |
"locationY": "384", | |
"defaultConnector": { | |
"targetReference": "customer_status_0" | |
}, | |
"defaultConnectorLabel": "customerGoodStanding", | |
"rules": { | |
"name": "customerDelinquent", | |
"conditionLogic": "and", | |
"conditions": { | |
"leftValueReference": "customerStatus", | |
"operator": "EqualTo", | |
"rightValue": { | |
"stringValue": "{status=delinquent}" | |
} | |
}, | |
"connector": { | |
"targetReference": "Select_Delinquent_Customer_Proposition" | |
}, | |
"label": "customerDelinquent" | |
} | |
}], | |
"formulas": [{ | |
"description": "propensity comes back from the API call as text and this converts it to a number", | |
"name": "churn_propensity_as_number", | |
"dataType": "Number", | |
"expression": "VALUE({!churnPropensity})", | |
"scale": "2" | |
}, { | |
"name": "CustomerStatusSentence", | |
"dataType": "String", | |
"expression": "\"Customer status = \" + {!customerStatus}" | |
}, { | |
"name": "Variables", | |
"dataType": "String", | |
"expression": "{!SelectedProposition.Name} & \" \" & {!churnPropensity} & \" \" & {!TEXT(churn_propensity_as_number)}" | |
}], | |
"interviewLabel": "NBADemoV2 {!$Flow.CurrentDateTime}", | |
"label": "NBADemoV14", | |
"processType": "AutoLaunchedFlow", | |
"recordCreates": { | |
"name": "Publish_PropositionGenerated_Event", | |
"label": "Publish PropositionGenerated Event", | |
"locationX": "678", | |
"locationY": "574", | |
"inputAssignments": [{ | |
"field": "PropositionAcceptLabel__c", | |
"value": { | |
"elementReference": "SelectedProposition.Accept_Label__c" | |
} | |
}, { | |
"field": "PropositionDescription__c", | |
"value": { | |
"elementReference": "SelectedProposition.Description__c" | |
} | |
}, { | |
"field": "PropositionFollowupFlowId__c", | |
"value": { | |
"elementReference": "SelectedProposition.FollowupFlowId__c" | |
} | |
}, { | |
"field": "PropositionId__c", | |
"value": { | |
"elementReference": "SelectedProposition.Id" | |
} | |
}, { | |
"field": "PropositionLabel__c", | |
"value": { | |
"elementReference": "SelectedProposition.Label__c" | |
} | |
}], | |
"object": "Recommendation_Generated__e" | |
}, | |
"recordLookups": [{ | |
"name": "Select_Delinquent_Customer_Proposition", | |
"label": "Select \"Delinquent Customer\" Proposition", | |
"locationX": "359", | |
"locationY": "409", | |
"assignNullValuesIfNoRecordsFound": "false", | |
"connector": { | |
"targetReference": "Post_to_TestConsole" | |
}, | |
"filters": { | |
"field": "Name", | |
"operator": "EqualTo", | |
"value": { | |
"stringValue": "Collect Bill" | |
} | |
}, | |
"object": "Proposition__c", | |
"outputReference": "SelectedProposition", | |
"queriedFields": ["Name", "Description__c", "Label__c", "Number__c", "Accept_Label__c", "FollowupFlowId__c"] | |
}, { | |
"name": "Select_General_Proposition", | |
"label": "Select General Proposition", | |
"locationX": "303", | |
"locationY": "889", | |
"assignNullValuesIfNoRecordsFound": "false", | |
"connector": { | |
"targetReference": "Post_to_TestConsole" | |
}, | |
"filters": { | |
"field": "Name", | |
"operator": "EqualTo", | |
"value": { | |
"stringValue": "General Upgrade Offer" | |
} | |
}, | |
"object": "Proposition__c", | |
"outputReference": "SelectedProposition", | |
"queriedFields": ["Name", "Description__c", "Label__c", "Number__c", "FollowupFlowId__c", "Accept_Label__c"] | |
}, { | |
"name": "Select_High_Churn_Risk_Proposition", | |
"label": "Select \"High Churn Risk\" Proposition", | |
"locationX": "318", | |
"locationY": "619", | |
"assignNullValuesIfNoRecordsFound": "false", | |
"connector": { | |
"targetReference": "Post_to_TestConsole" | |
}, | |
"filters": { | |
"field": "Name", | |
"operator": "EqualTo", | |
"value": { | |
"stringValue": "Retention Offer - High Churn Risk" | |
} | |
}, | |
"object": "Proposition__c", | |
"outputReference": "SelectedProposition", | |
"queriedFields": ["Name", "Description__c", "Label__c", "Number__c", "Accept_Label__c", "FollowupFlowId__c"] | |
}, { | |
"name": "Select_Highest_Churn_Risk_Proposition", | |
"label": "Select \"Highest Churn Risk\" Proposition", | |
"locationX": "321", | |
"locationY": "523", | |
"assignNullValuesIfNoRecordsFound": "false", | |
"connector": { | |
"targetReference": "Post_to_TestConsole" | |
}, | |
"filters": { | |
"field": "Name", | |
"operator": "EqualTo", | |
"value": { | |
"stringValue": "Retention Offer - Highest Churn Risk" | |
} | |
}, | |
"object": "Proposition__c", | |
"outputReference": "SelectedProposition", | |
"queriedFields": ["Name", "Description__c", "Label__c", "Number__c", "Accept_Label__c", "FollowupFlowId__c"] | |
}, { | |
"name": "Select_Medium_Churn_Risk_Proposition", | |
"label": "Select \"Medium Churn Risk\" Proposition", | |
"locationX": "322", | |
"locationY": "721", | |
"assignNullValuesIfNoRecordsFound": "false", | |
"connector": { | |
"targetReference": "Post_to_TestConsole" | |
}, | |
"filters": { | |
"field": "Name", | |
"operator": "EqualTo", | |
"value": { | |
"stringValue": "Retention Offer - Medium Churn Risk" | |
} | |
}, | |
"object": "Proposition__c", | |
"outputReference": "SelectedProposition", | |
"queriedFields": ["Name", "Description__c", "Label__c", "Number__c", "FollowupFlowId__c", "Accept_Label__c"] | |
}], | |
"startElementReference": "Post_to_TestConsole_0", | |
"variables": [{ | |
"name": "churnPropensity", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "curCustomer", | |
"dataType": "SObject", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true", | |
"objectType": "EinsteinDenormalizedCustomer__c" | |
}, { | |
"name": "curCustomerV2", | |
"dataType": "SObject", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true", | |
"objectType": "EinsteinDenormalizedCustomer__c" | |
}, { | |
"name": "Customer_AccountId", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "Customer_Name", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "Customer_SampleId", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "customerId", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true", | |
"value": { | |
"stringValue": "78" | |
} | |
}, { | |
"name": "customerStatus", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "EstimatedChurnRisk", | |
"dataType": "Number", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true", | |
"scale": "2" | |
}, { | |
"description": "not sure why Recommendation Request has to stick an output somewhere, so creating this to examine the output.", | |
"name": "eventSink", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "Feed_ID", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "false", | |
"isOutput": "false" | |
}, { | |
"name": "NextBestPropositionName", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true", | |
"value": { | |
"stringValue": "\"No Proposition Proposed\"" | |
} | |
}, { | |
"name": "recommendationEventSink", | |
"dataType": "SObject", | |
"isCollection": "false", | |
"isInput": "false", | |
"isOutput": "false", | |
"objectType": "Recommendation_Request__e" | |
}, { | |
"name": "SelectedProposition", | |
"dataType": "SObject", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true", | |
"objectType": "Proposition__c" | |
}, { | |
"name": "temp", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}, { | |
"name": "temp2", | |
"dataType": "String", | |
"isCollection": "false", | |
"isInput": "true", | |
"isOutput": "true" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment