Salesforce
16 min
learn how to connect engini to salesforce with the salesforce activities in engini you can create, update, delete, get one or more records to get started with the salesforce app, create an account for free at salesforce com getting started with salesforce prerequisites a salesforce account connecting engini to salesforce add a connection to salesforce in engini enter your engini account at https //app engini io https //app engini io navigate to connections page by clicking on the connections on the left sidebar or by clicking here https //app engini io/connections click on the add connection option located at the topbar choose salesforce option from the available applications enter the following details in the “edit connection” form connection name enter a unique and descriptive name for this connection this name will help you easily identify and manage your salesforce connection within your system authentication method – select the authentication method used to connect your salesforce account for new connections, choose oauth2, which is the recommended and supported sign in method the old (deprecated) option is only kept for legacy connections and should not be used for new setups environment choose the environment you want to use production\sandbox api url this is the base salesforce endpoint that defines which environment (production or sandbox) the system sends api requests to, and it is usually filled automatically after signing in access token a token for authorization to access microsoft services refresh token a token used to obtain a new access token when the current one expires api version choose the api version you use it is recommended to always choose the latest version sign in with microsotf click on the “microsoft signin” button sign into your microsoft account save settings click on the save button to save the connection triggers engini has three triggers for salesforce two of the triggers are schedule triggers (check for created records and check for updated records) and one of them is automated trigger (outbound message webhook) check for created records object type select the type of object you want to check if a new record has been created starting (utc) choose the date and time for this workflow to start working for the selected day time the workflow will run according to the selected frequency recue every select the time interval the minimum time interval is 15 minutes you’ll see the date and time for the next run according to utc time and your local time add time frame you can specify a time frame during which the trigger will operate click on “add time frame” button select a specific time frame to activate the trigger for example, every 15 minutes from 8 am to 5 pm top n you can set the maximum number of records engini will return for the object you chose (default = all records) add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //help engini ai/workflow editor#add filters add sort click add sort to organize the data list by a selected field in ascending or descending order to learn more about sorting data, click here https //help engini ai/workflow editor#add sorts check for updated records object type select the type of object you want to check if a new record has been created starting (utc) choose the date and time for this workflow to start working for the selected day time the workflow will run according to the selected frequency recue every select the time interval the minimum time interval is 15 minutes you’ll see the date and time for the next run according to utc time and your local time add time frame you can specify a time frame during which the trigger will operate click on “add time frame” button select a specific time frame to activate the trigger for example, every 15 minutes from 8 am to 5 pm top n you can set the maximum number of records engini will return for the object you chose (default = all records) add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //help engini ai/workflow editor#add filters add sort click add sort to organize the data list by a selected field in ascending or descending order to learn more about sorting data, click here https //help engini ai/workflow editor#add sorts outbound message webhook an outbound message webhook is a type of activity, which receives data for a url the user will define the url created in the this activity in the outbound message platform of salesforce, in order to send a webhook to engini in this webhook trigger we added a fixed response structure, which corresponds to the structure accepted in salesforce url – the full webhook endpoint where salesforce sends the outbound request relative url – an optional path appended to the base url, used to route the request to a specific endpoint generate output schema – allows you to upload a sample payload so the system can automatically generate the expected request structure define manually – click this button to manually define the output schema after clicking it, you can add the required response fields yourself and make them available for use later in the workflow copy sample json – click to copy a sample json structure based on the defined output schema this can help you understand how the response data will look and how to use it later in the workflow name – enter the technical field name that will be used by the workflow this name should match the field key from the response, for example customername display name – enter a readable name for the field this name will be shown in the workflow builder to make the field easier to identify description – add a short explanation of what this field represents this helps users understand what data the field contains and when to use it type – select the data type for the field, such as string, number, boolean, object, or array the selected type defines how the field value will be handled in the workflow required – mark this option if the field must always be included in the response leave it unchecked if the field is optional apply – click apply to save the field definition and add it to the output schema the button becomes available after the required field details are completed actions create record creates a new record of the selected object type object type select from the drop down the type of record you want to create depending on the object of the selected type, additional fields that must be completed will become available for example, when selecting “account” an additional field named “account name” will show in this field you are required to fill in the name of the new account you are creating add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields update record updates an existing record in an object object type select from the drop down the type of record you want to update record id enter the id of the record you want to update add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields delete record deletes a record object type select from the drop down the type of record you want to delete record id enter the id of the record you want to delete get record gets a specified record in an object object type field select from the drop down the type of record you want to retrieve record id field enter the id of the record you want to retrieve get records gets all the records in an object object type select from the drop down the type of record you want to retrieve click on the “add sorting” button choose from the drop down the field you want to sort by choose the sorting option descending or ascending you can do a multi sort by choosing to sort more than one field use the arrows on the right to select the field that will be used as the primary sort, secondary, etc top n you can set the maximum number of records engini will return for the object you chose (default = all records) add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //help engini ai/workflow editor#add filters add sort click add sort to organize the data list by a selected field in ascending or descending order to learn more about sorting data, click here https //help engini ai/workflow editor#add sorts download attachment/document downloads file from salesforce object type select from the drop down the type of record that holds the file you want to download usually attachment or document record id enter the id of the record that holds the file you want to download file content column by default when fetching the file from an attachment or document type object the url to download the file is in the “body” property of the object you can change this to download the file from a different property when fetching the file from other object types send api request the send api request action allows you to call any salesforce rest api endpoint directly, giving full control over the url, method, headers, and request body base url – the salesforce instance domain that serves as the root for the api call relative url – the specific api path appended to the base url (for example, a rest resource) method – the http method used for the request (get, post, put, patch, delete) body type – defines the content type of the request payload (commonly application/json) body – the request payload sent to salesforce, structured according to the selected api endpoint add headers – used to include additional http headers such as authorization or custom headers add queries – adds query string parameters to the request url the output of this activity returns the following base64string – holds the file content filename filesize url