Examples for Workato recipes
In this article, you learn how to use the different actions available in the Sitefinity Insight Workato connector.
PREREQUISITES: You must have set up a Salesforce connection in Workato.
Copy a sample recipe into your Workato project
You can use these samples as starting templates for creating your own Workato recipes. To use them, perform the following:
- In your Workato account, in the menu on the left, click Community Library.
Alternatively, browse to Community library.
- Under Recipes, search for Progress Sitefinity Insight.
- Click the recipe you want.
The recipe template opens.
- Click Use this recipe.
- When prompted, click or edit your recipe before testing.
- To create a copy of the recipe into your project, follow the instructions from Workato.
RESULT: The sample is copied into your Workato project, and you can start customizing it to suit your needs.
Sync in real-time Salesforce contact to Sitefinity Insight
Using this sample, you learn how to use the Send metadata action. The sample demonstrates how to import data in real time from Salesforce in Sitefinity Insight.
Sometimes, you need to react to an event quickly. For example, you may want to import the information about a certain Salesforce contact immediately when it was created in the CRM system. In Sitefinity Insight, you can use this information to set up a website personalization augmenting the visitor’s journey.
After completing this sample, you will have a Workato recipe to import Salesforce customer as Sitefinity Insight contact, together with their contact information, which runs every time a new contact appears in Salesforce.
PREREQUISITES: You must have copied the sample Sync created Salesforce Contact in Real-Time to Sitefinity Insight in your project, as described in the procedure Copy sample recipe into your Workato project above.
Perform the following:
- Under Trigger, click the New contact in Salesforce (Real-time) trigger to open its properties.
This step depends on how you have configured your Salesforce connection in Workato.
For more information, see Workato’s documentation » Real-time triggers.
- In Object, choose Contact.
- In Fields to retrieve, choose the Salesforce contact properties that you want imported in Sitefinity Insight.
For example, Contact ID, Last Name, First Name, and Email.
- In When first started, this recipe should pick up events from, select Beginning of time.
- Under Actions, click the Send Metadata to Progress Sitefinity Insight action to open its properties.
- In Data center, select the Insight data center, which holds the incoming data from Salesforce.
- In Data source, select an existing data source or create an Insight data source.
- In Data to send, select Metadata.
- Under Data mapping, configure the metadata mapping.
This is the way the column names coming from Salesforce are mapped to column names understandable by Sitefinity Insight.
For more information, see CSV files format.
For example:
- In Subject/Unique ID, select Contact ID.
- In Timestamp, select Created Date.
- In Email, select Email.
- In FirstName, select First Name.
- In LastName, select Last Name.
RESULT: Your recipe is ready to test and use.
Sync contacts from Salesforce to Sitefinity Insight in bulk
Using this sample, you learn how to use the Import CSV file action. The sample demonstrates how to import large amounts of data in bulk.
After completing this sample, you will have a Workato recipe to import Salesforce customers as Sitefinity Insight contacts, together with their contact information as a bulk operation, scheduled to run periodically.
PREREQUISITES: You must have copied the sample Sync contacts from Salesforce to Sitefinity Insight in bulk in your project, as described in the procedure Copy sample recipe into your Workato project above.
Perform the following:
- Under Trigger, click the Export new/updated contacts in Salesforce (bulk) trigger to open its properties.
This step depends on how you have configured your Salesforce connection in Workato.
For more information, see Workato’s documentation » Salesforce - Export new or new/updated records trigger (bulk).
- In Object, select Contact.
- In Fields to retrieve, select the Salesforce contact properties you want imported in Sitefinity Insight.
For example, Contact ID, Last Name, First Name, Email, Title, and Last Modified Date.
- In When first started, this recipe should pick up events from, enter the start time after which the events will be imported.
- In Schedule settings, configure the time interval on which the import will run.
For example, 1 hour.
- Under Actions, click the Import CVS file into Progress Sitefinity Insight (bulk) action to open its properties.
- In Data center, select the Insight data center, which holds the incoming data from Salesforce.
- In Import type, enter the Sitefinity Insight import type that you have created.
For more information, see Design your automated integration strategy » Import types.
- In Data source, select or create an Insight data source.
For more information, see Design your automated integration strategy » Data sources.
- In CSV file contents, use the datapill of the Export new/updated contacts in Salesforce (bulk) trigger you set in Step 1.
- Under CSV columns, describe the format of the CSV file as it comes from Salesforce.
For more information, see Workato’s documentation » Handling CSVs.
RESULT: Your recipe is ready to test and use.
Sync records from Salesforce using SOQL
Using this sample, you learn how to use Get latest imported timestamp and Import a CSV file to Sitefinity Insight actions together.
You may need to implement more complex data integration scenarios – for example, you have a custom date column tracking a change state in Salesforce, or an existing SOQL query doing joins to obtain more information about your event.
In such cases, you can run a SOQL query on a time-based schedule. If you use a custom datetime field to store the last time your data has changed, you need to map this date to the Timestamp column to Sitefinity Insight. In subsequent runs of the recipe, you can extract the maximum reported timestamp so far, and use it to skip double-importing Salesforce data.
PREREQUISITES: You must have copied the sample Sync records from Salesforce using SOQL in your project, as described in the procedure Copy sample recipe into your Workato project above.
Perform the following:
- Under Data mapping, configure the metadata mapping.
This is the way the column names coming from Salesforce are mapped to column names understandable by Sitefinity Insight.
For more information, see CSV files format.
For example:
- In Unique ID, select Id.
- In Timestamp, select LastModifiedDate.
- To configure how often the recipe runs, click the Trigger every 5 minutes trigger.
Use Time Unit and Trigger every to specify the recurrence period.
For example, 1 hour.
- Under Actions, click the Create variables action.
Create the variables for Import type and Data source and set them to the respective Sitefinity Insight values.
For more information, see Design your automated integration strategy » Import types and Data Sources.
- Click the Get latest imported timestamp action to open its properties.
- In Data center, select the Insight data center, which holds the incoming data from Salesforce.
- In Import type, select Import type you created in Step 2.
- In Fallback date, enter the default date to be used when this recipe runs for first time.
- Click the Search records in bulk using SOQL query (API 2.0) in Salesforce action to open its properties.
This step depends on how you have configured your Salesforce connection in Workato.
For more information, see Workato documentation » Salesforce bulk operations.
- To get the custom data you need, in SOQL query, enter your SOQL query.
For example, enter 'SELECT Id, Email, LastName, LastModifiedDate FROM Contact where LastModifiedDate >' + “Last timestamp from Step 3” datapill.
- In Include header line, select Yes.
- Click the Import CSV file action to open its properties.
- In Data center, select the Insight data center, which holds the incoming data from Salesforce.
- In Import type, select the variable Import type you created in Step 2.
For more information, see Design your automated integration strategy » Import types.
- In Data source, select the variable Data source you created in Step 2.
For more information, see Design your automated integration strategy » Data sources.
- In CSV file contents, select CSV results you created in Step 4.
- Under CSV columns, describe the format of the CSV file as it comes from Salesforce.
For more information, see Workato documentation » Handling CSVs.
- Under Data mapping, configure the metadata mapping.
This is the way the column names coming from Salesforce are mapped to column names understandable by Sitefinity Insight.
For more information, see CSV files format.
For example:
- In Unique ID, select Id.
- In Timestamp, select LastModifiedDate.
RESULT: Your recipe is ready to test and use.