For a user to be able to perform an action against a list of customer contacts that match a certain condition
- Install NPM (Npm Docs)
- Install Git to your local machine (Git Docs)
- Git clone repo
- Navigate to the project folder with the command prompt:
cd yourprojectfolder
npm install
npm start
- AWS (RDS, API Gateway, Lambda, EventBridge, Step Functions)
- Node.js 14.15.4
- NPM 6.14.10
- PostgreSQL
- React 17.0.2
- Tailwind UI 0.3.2
TBD with input from team
- Create, view, pause or un-pause automation
- Enter any SQL statment(as long as it returns a list of Salesforce Contact IDs)
- User can select salesforce flow
- User can select true false indicator indicating whether or not a user workflow can run on the same set of contacts multiple times
- Show execution logs
- Multiple automations
- Adding capability to "map" additional columns of the SQL statement output to additional "API Input Parameters"
- Edit and delete automation
- User authentication/authorization
- Search functionality for user workflow page
- User can create, view, pause or unpause automation
- System queries the databases upon triggering automation
- Contact ID's returned from SQL query are posted to Salesforce flow
- Multiple automations
- Show output logs
- User
- Log in
- Create automation(s)
- Enter any SQL statement
- Pick Salesforce Flow
- True/False Indicator
- View Execution Logs/current automations
- (un)Pause a new automation
{
"actions" : [
{
"label": "Create Opportunities",
"name": "Create_Opportunities",
"type": "FLOW",
"url": "/services/data/v51.0/actions/custom/flow/Create_Opportunities"
},
{
"label": "Create Opportunity",
"name": "Create_Opportunity",
"type": "FLOW",
"url": "/services/data/v51.0/actions/custom/flow/Create_Opportunity"
}
]
}
/salesforceflows/flow?flowUrl=/services/data/v51.0/actions/custom/flow/Create_Opportunity
OR
flowUrl=/services/data/v51.0/actions/custom/flow/Create_Opportunity
{
"label": "ContactToProcess",
"type": "STRING"
}
{
"inputs": [
{
"contactId": "0034x000007DXthAAG"
}
],
"salesforceFlowName: "create_opportunity",
}
OR
{
"inputs": [
{
"ContactsToProcess": [
{
"attributes": {"type": "Contact"},
"Id" : "0034x000007DYA3AAO"
},
{
"attributes": {"type": "Contact"},
"Id" : "0034x000001c4YQAAY"
},
{
"attributes": {"type": "Contact"},
"Id" : "0034x000003YaRvAAK"
}
]
}
]
}
[
{
"actionName": "Create_Opportunity",
"errors": null,
"isSuccess": true,
"outputValues": {
"recordId": null,
"Flow__InterviewStatus": "Finished"
}
}
]
OR
[
{
"actionName": "Create_Opportunities",
"errors": null,
"isSuccess": true,
"outputValues": null
}
]
/salesforceflows/metadata?sObjectType=Contact
OR
sObjectType=Contact
{
"metadata": [
{
"aggregatable": true,
"aiPredictionField": false,
"autoNumber": false,
"byteLength": 18,
"calculated": false,
"calculatedFormula": null,
"cascadeDelete": false,
"caseSensitive": false,
"compoundFieldName": null,
"controllerName": null,
"createable": false,
"custom": false,
"defaultValue": null,
"defaultValueFormula": null,
"defaultedOnCreate": true,
"dependentPicklist": false,
"deprecatedAndHidden": false,
"digits": 0,
"displayLocationInDecimal": false,
"encrypted": false,
"externalId": false,
"extraTypeInfo": null,
"filterable": true,
"filteredLookupInfo": null,
"formulaTreatNullNumberAsZero": false,
"groupable": true,
"highScaleNumber": false,
"htmlFormatted": false,
"idLookup": true,
"inlineHelpText": null,
"label": "Contact ID",
"length": 18,
"mask": null,
"maskType": null,
"name": "Id",
"nameField": false,
"namePointing": false,
"nillable": false,
"permissionable": false,
"picklistValues": [],
"polymorphicForeignKey": false,
"precision": 0,
"queryByDistance": false,
"referenceTargetField": null,
"referenceTo": [],
"relationshipName": null,
"relationshipOrder": null,
"restrictedDelete": false,
"restrictedPicklist": false,
"scale": 0,
"searchPrefilterable": false,
"soapType": "tns:ID",
"sortable": true,
"type": "id",
"unique": false,
"updateable": false,
"writeRequiresMasterRead": false
},
...
}
{
"statusCode":200,
"body":[
{
"table_name":"SalesforceContacts"
},
{
"table_name":"contact_workflows"
},
{
"table_name":"workflows"
},
{
"table_name":"workflow_logs"
},
{
"table_name":"users"
}
],
"headers":{
"Access-Control-Allow-Origin":"*",
"Access-Control-Allow-Headers":"*"
}
}
/database/users/columns
[
{
"column_name": "salesforce_id"
},
{
"column_name": "first_name"
},
{
"column_name": "last_name"
}
]
[
{
"id": 20,
"flow_url": "/services/data/v51.0/actions/custom/flow/Create_Opportunity",
"name": "www",
"description": "",
"table": "SalesforceContacts",
"column": "id",
"label": "ContactToProcess",
"type": "STRING",
"sobject_type": "undefined",
"where_clause": "length(title) > 0",
"mapping": {},
"run_again": true,
"active": true,
"pk_column": "id"
},
{
"id": 8,
"flow_url": "/services/data/v51.0/actions/custom/flow/Create_Opportunities",
"name": "Test Create_Opportunity",
"description": "undefined",
"table": "SalesforceContacts",
"column": "",
"label": "ContactsToProcess",
"type": "SOBJECT",
"sobject_type": "Contact",
"where_clause": "length(email) > 0",
"mapping": {
"OtherAddress": "lastmodifieddate",
"OtherStreet": "lastmodifiedbyid",
"Name": "fan_type__c",
"Id": "id"
},
"run_again": true,
"active": true,
"pk_column": "id"
}
]
{
"name":"My Test Workflow",
"desc":"Some automation",
"flowUrl":"/services/data/v51.0/actions/custom/flow/Create_Opportunities",
"table":"SalesforceContacts",
"column":"",
"label":"ContactsToProcess",
"type":"SOBJECT",
"sObjectType":"Contact",
"whereClause":"length(email) > 0",
"mapping":{
"Id":"id",
"Title":"title"
},
"active":true,
"runAgain":true
}
{
"statusCode":200,
"body":{
"command":"INSERT",
"rowCount":1,
"oid":0,
"rows":[],
"fields":[],
"_types":{
"_types":{
"arrayParser":{
},
"builtins":{
"BOOL":16,
"BYTEA":17,
"CHAR":18,
...
}
},
"text":{},
"binary":{}
},
"RowCtor":null,
"rowAsArray":false
},
"headers":{
"Access-Control-Allow-Origin":"*",
"Access-Control-Allow-Headers":"*"
}
}
/myworkflows/logs/8
[
{
"id": 13,
"workflow_id": 8,
"action_name": "Create_Opportunity",
"time_of_completion": "2021-05-03T18:23:01.267Z",
"is_flow_successful": true
},
{
"id": 15,
"workflow_id": 8,
"action_name": "Create_Opportunity",
"time_of_completion": "2021-05-03T18:25:51.146Z",
"is_flow_successful": true
}
]
/myworkflows/23
{
"Access-Control-Allow-Origin":"*",
"Access-Control-Allow-Headers":"*",
"X-Amzn-Trace-Id":"Root=1-60930ed6-9c95119c8a4e9068020833b3;Sampled=0"
}
/myworkflows/13
{
"id": 13,
"flow_url": "/services/data/v51.0/actions/custom/flow/Create_Opportunities",
"name": "Test test 123",
"description": "undefined",
"table": "SalesforceContacts",
"column": "",
"label": "ContactsToProcess",
"type": "SOBJECT",
"sobject_type": "Contact",
"where_clause": "length(title) > 0",
"mapping": {
"MasterRecordId": "assistantphone",
"AccountId": "createddate",
"Id": "id"
},
"run_again": true,
"active": true,
"pk_column": "id"
}
/myworkflows/13
{
"name": "My Test Workflow",
"desc": "Some automation",
"flowUrl": "/services/data/v51.0/actions/custom/flow/Create_Opportunities",
"table": "SalesforceContacts",
"column": "",
"label": "ContactsToProcess",
"type": "SOBJECT",
"sObjectType": "Contact",
"whereClause": "length(email) > 0",
"mapping": {
"Id": "id",
"Title": "title"
},
"active": true,
"runAgain": true
}
{
"command": "UPDATE",
"rowCount": 1,
"oid": null,
"rows": [],
"fields": [],
"_types": {
"_types": {
"arrayParser": {},
"builtins": {
"BOOL": 16,
"BYTEA": 17,
"CHAR": 18,
...
}
},
"text": {},
"binary": {}
},
"RowCtor": null,
"rowAsArray": false
}
Created by: Leanne Sall, Gökay Abay, Nick Charvat, Steven Lai, Yaroslav Naft. In partnership with Agilitek Solutions