This article provides instructions on updating and accessing your Simpplr sandbox account after creating or refreshing your sandbox environment in Salesforce. It is a continuation of this article. If you haven't already, be sure to create your partial sandbox environment in Salesforce before proceeding with the instructions below.
Table of Contents
Update or add Remote Site Settings
If you've just finished refreshing your sandbox, you'll need to update the REST_API_URL in the Remote Site Settings to reflect the sandbox instance. Be sure you're logged in using the Simpplr Service Account credentials directly from the Salesforce login screen to complete these steps. Do not use the "log in as" feature as another user.
- From Setup in your sandbox environment, type Company information into the Quick Find box and click on the Company Information result.
Navigate to Instance in the right column. You should see it begins with "CS". This will confirm you're in your sandbox environment.
- Now, back in the Quick Find box, type Remote Site Settings and go to the Remote Site Settings page.
- Scroll down until you see REST_API_URL and click Edit. Replace the url shown with https://csxx.salesforce.com (being sure to use the number you saw in your Instance in place of "xx". For example, if your number was cs55, your url would be https://cs55.salesforce.com). Then click Save.
- Go back to the Remote site Settings menu and click New Remote Site. Name your new Remote Site and assign the url as https://staging.api.simpplr.com. Click Save.
Update post install instructions
- From the Quick Find box, type Installed Packages and click the result. Choose Simpplr, then scroll down to Post Install Instructions and click View. This will open a new page. In the Service Account Setup box, click Connect account. You will be asked to allow Simpplr access to Salesforce functions. Click Allow. You can now access Simpplr in your sandbox environment.
Import Chatter groups (Simpplr sites) to sandbox via the data loader
Note:For this section you'll need to have the Salesforce data loader installed using your Production environment. For instructions, click here. You'll also need to be a Salesforce System admin user.
Why is this step necessary? When updating your sandbox, you'll need to complete this step to ensure Simpplr site data is carried over after the sandbox refresh.
- Open the data loader on your desktop and click Export All.
- Log in to your Production environment and check the box next to Show all Salesforce objects.
- Select Group (CollaborationGroup) from the dropdown menu, add the file name GroupExport.csv and choose the location where you want to save the .csv file, and click Next.
- Check the boxes next to the query fields: CollaborationType, Id, Name, and OwnerId. This will auto generate a query as shown below. You can edit this query as needed. Or you can copy and paste the query into the field as shown here: Select CollaborationType, Id, Name, OwnerId, owner.isactive FROM CollaborationGroup. The owner.isactive field will need to be typed into the query, as shown below.
- Click Finish, then in the popup, choose Yes when asked if you want to proceed. Then click OK. You can now close the data loader.
- Navigate back to your sandbox Salesforce environment and open Simpplr. Go to Manage Application > Troubleshooting and uncheck the Collaboration Group box. Then click Save. This step is going to prevent duplicate sites from being created.
Import and export sandbox data using the data loader
Before completing this next series of steps, you'll want to make sure all inactive users from your Production environment of Salesforce have been removed by removing any "false" values from the GroupExport.csv spreadsheet you just created in the owner.isactive column. This step was completed above.
You'll also need to log out of your data loader in Production (File > logout) before starting these steps.
- Reopen the data loader and click Insert.
- From the dropdown menu, choose Sandbox (remember, you should be logged out of the Production environment right now). Enter your sandbox username and password, then click Log in. Then click Next.
- Check the box for Show all Salesforce objects and find Group (CollaborationGroup).
- Upload the GroupExport.csv file you downloaded from before using Browse.... Then click Next.
- From the next page, choose Create or Edit a Map and select Auto-Match Fields to Columns. Then click OK.
- Once the map is created, choose a location to save your success and error files on your computer. Click Next then Finish, then Yes. Your data is now syncing to your Sandbox environment.
- From the data loader home, click Export All. Then check the box for Show all salesforce objects. Once again, locate Group (CollaborationGroup) and select it. Click Next.
- Enter the following query into the box at the bottom, or select the fields from the list, then click Finish:
Select id, Name, OwnerId, CollaborationType FROM CollaborationGroup where Owner.isactive=TRUE order by name asc
Export Simpplr__Simpplr_Site__c data
- From the data loader, click Export All. Ensure you're still logged in to your sandbox environment. Then select the Simpplr Site (Simpplr__Simpplr_Site__c) object from the dropdown list. Choose a target for extraction. This is where you'll name your file and choose the saving point on your computer. Name your file SimpplrSiteExport.csv. Then click Next.
Either choose the following fields from the list, or enter the query below:
Select id, name, simpplr__Chatter_group_id__c from Simpplr__Simpplr_Site__c order by name ascThe query should read like the image shown below. Once input, click Finish, then Yes.
- Once the SimpplrSiteExport.csv file is exported, you'll need to replace the Simpplr__Chatter_Group_Id__c column with the ID exported from the file you just created. Copy the Id column from the file you created at the end of the last step and paste it to the Simpplr__Chatter_Group_Id__c column in SimpplrSiteExport.csv. Save the SimpplrSiteExport.csv file (file 2).
- When logged in to your sandbox environment, upload the modified SimpplrSiteExport.csv file back to the data loader using the Update function.
- Select the Simpplr Site (Simpplr__Simpplr_Site__c) object and upload your SimpplrSiteExport.csv file using Browse....
- Click Next.
- From the next page, choose Create or Edit a Map and select Auto-Match Fields to Columns. Then click OK. Click Next.
- Once the map is created, choose a location to save your success and error files on your computer. Click Next then Finish, then Yes.
- Close the data loader. Navigate to your Sandbox Simpplr environment and from Manage > Application > Troubleshooting, and check the box next to Collaboration group to reenable the trigger. Click Save.
If your sites are not appearing after you complete the upload, it may be due to having some inactive sites. Sites automatically go inactive after 90 days of no activity. You can run the following query either in data loader or in the dev console to check for inactive sites. If a site is inactive, you can run the export from your sandbox environment in data loader change the line items in the file to "true" under Simpplr__Is_Active__c column, then upload the file under object Simpplr__Simpplr_site_c.
Query: SELECT Id, Name, Simpplr__Chatter_Group_Id__c, Simpplr__Is_Active__c FROM Simpplr__Simpplr_Site__c
For more information on completing bulk actions using the data loader, check out this article.