Salesforce Triggering an External Procedure - salesforce

I'm not 100% sure of the terminology on how to describe what I'm looking to do, so I apologize in advance.
I have a custom entry page for an object in salesforce, and I'm curious as to whether or not it's possible to call an external website when I click the save button.
Rough Example:
User enters in a new Account and hits save.
After saving the Account, The extender class calls to a webpage that inserts an entry into an external database to let a different set of users external to salesforce know that something new has been created.
Again, I apologize. I know I'm not describing this very well. Thank you for any and all input!

Yes, it is possible. Take a look at the Invoking Callouts Using Apex section of the Apex Code Developer's Guide. Salesforce refers to this (your Apex code connecting to another web server) as an HTTP Callout.
Also, take a look at questions with the "callout" tag on the dedicated StackExchange site for Salesforce.com.

Related

Looking for suggestions on web hosting solution (Wix, Squarespace, WordPress, for following

I want to host a clean, branded site that allows users to submit data which I will post process on some regular cadence and send custom emails based on data processing results. I can write code and have extensive experience with AWS, but am looking for the fastest solution.
Any experienced web developers have suggestions of which hosting solution to use? Wix, Squarespace, WordPress. I would prefer Squarespace but am not finding clear documentation stating I can create a form which writes to a database (I.e. DynamoDB, Redshift).
Any suggestions would be great! Thanks!
Having a good deal of experience with Squarespace, I will address the question "Is it possible to connect a Squarespace form to a third-party database and, if so, by what means?". While I won't address Wix or Wordpress, hopefully it will provide some objective answers and provide some help to your larger context/question.
Squarespace doesn't support any server-side code; it only supports supports the addition of HTML, CSS and Javascript within Code Injection, Code Blocks, and Developer Mode.
Therefore, your options are:
Send the data client-side with JavaScript. Write your own HTML form and insert it via code block, markdown block, of developer mode. Then write the corresponding JavaScript to send the data, on submit, to your external database. Alternatively, use a Squarespace form block, prevent the default submission from executing and use your own methods instead.
Connect the Squarespace form block to a Google Sheet and the sheet to the external DB via Apps Script. Once connected, use Apps Script (set to trigger when a row is added to the sheet) to obtain the submission from the sheet and send it to your external database (similar to this or this, but you'll be going "the other way", sending data to the external DB from Apps Script).
Use Zapier (or similar service) to bridge the gap, either using Squarespace's built-in integration or setting up Zapier on your own and setting the Zapier email address as the email recipient. You can use Zapier to send form submissions to a new item in DynamoDB, for example. It appears that, at a minimum, you'd have to pay for Zapier as that is a "Premium Integration". For Squarespace, if you were to use their built-in Zapier integration, you'll have to pay for a higher-cost plan (which could be avoided by using the email storage option instead, as mentioned previously).
I think you should choose WordPress, they have a huge documentation, a big community, you can get a ton of support from Wordpress's users when you run into a problem.

Where can I get Jira's database structure for service desk?

I want to build service desk dashboards and I want to look at a database structure with a ticketing system to understand exactly what am I going to need. I am working with Jira already and I wanted to check its database, but I haven't found what I need.
Thanks in advance!
On the administrator's System page sidebar, there's a "Plugin Data Storage" menu item that will show you what database tables correspond to each add-on. From there you can see that Service Desk table names usually begin with AO_54307E.
You shouldn't need to access the database directly. Check https://docs.atlassian.com/jira-servicedesk/REST/server/ for whether the information you need is available via the REST API.

Integrate SurveyMonkey in an existing community

I have a cakePHP community. User are able to signup and login. I like to create a survey using SurveyMonkey.
Therefor I create the survey and make it available to my members using the direct URL. In my member database I have to save the information "did completed the survey = yes/no".
Is there any way to identify the user filling in the survey and write this information into the database?
SurveyMonkey has an API https://developer.surveymonkey.com/ , that let you collect info from your survey (completedf or not).
This is the only way i think, (if it s not include in your website).
I know that you can simply do this with Examinare Survey Tool. What you do first is that you use the API inside Examinare to add a recipient for all the users in the survey base.
Use the PHP Wrapper library in their developer site.
Loop it through and use the https://developer.examinare.com/php-wrapper-library/ and use the example code.
If you let people register with same email more than 1 time then save the ContactID into your database on the recipient.
Then to not create an email invite you use this : markrecipientstosurvey
The surveyID is available inside the Examinare account.
When you done this script part then make it as a cronjob for instance inside the crontab -e
I would run it every 30 minutes or 1 per hour.
Next part you create a page for the survey redirect where you use the function: listsurveysbyuser
to get the survey version and url
(there is a special link for the mobile user that even works for the normal mobile phone NOT only smartphones)
Now you just redirect them to the survey. If you want them to return to your site after then you use the redirect_url parameter that is added to the url or use the redirect inside your account. Ask support about that if you need :) They are fast... Never had to wait more than a couple of minutes.
When the person return then just check if they are marked as complete with the same api call: listsurveysbyuser
Looks much but it is very easy to implement and if you have any problems then just ask the support at support#examinare.com I have asked alot and never had them to say that it can not be done. Really nice!
EDIT:
I see that they just released a tutorial much better than my example:
https://developer.examinare.com/how-to-use-surveys-in-cakephp-with-very-little-development/
One option:
Use unique Custom Variables in the URL that is visited by each member of the community
For example, https://www.surveymonkey.com/s/your_survey?userid=$my_user_id
Note that you can create weblink or email collectors with the API (endpoints: create_flow or create_collector).
Then track the responses using the get_respondent_list or get_responses endpoints of the API.
Note: Please confirm with the Survey Monkey API team that the custom variables can be read via the API.
Another option:
Use the email collector (create_flow) API endpoint and send it to your members' email addresses.

Access VisualForce Page without salesforce account

I'd like to create visualforce page that inserts a record into salesforce account object. However, I expect some of the page users won't have salesforce accounts. Can they still access it? If not, what are the alternatives that can be used to visualforce page in this case? (Please don't consider Web to Lead Forms).
Thanks,
Yes, it's possible. Go read about Salesforce Sites. For a start:
http://wiki.developerforce.com/page/Websites
http://wiki.developerforce.com/page/An_Introduction_to_Force.com_Sites
(of course it's also possible to write that page in say Java/.NET/PHP and use integration via SOAP or REST to talk to Salesforce... but these 2 main links will keep the whole solution within SF so no need to need to learn new language, have extra maintenance effort etc)
Sites are VF pages that expose a bit of your company's data without need to log in. You can use them to input data too, just remember that in theory anybody could learn the link and spam you (not too different from web2lead, inbound email handlers etc). You specify security in a way similar to Profiles, the records will have "Created By = {site name} Guest User".
I don't think there's anything out of the box to restrict visibility, they're open to whole world. So if you would want something similar to login IP ranges (so only sales reps from your office's network can enter data) - you might have to write some logic in the controller.

GoogleApps Provisioning API to move a user from one organization to another

i have a use case to move a user from one Organization to another. The Api i am using is provisioning API. Managing Org Users gave an example for lab. Can anybody please share more info on what jar's need to be used to implement this. My rest of code is able to manage the other user functionallity.
My Code is in java
I am using jars gdata-appsforyourdomain, gdata-client, gdata-core and gdata-collect. These jars dont have any API's to manage the organizations with users. It would be great help if any one can share docs or any sample data on this use-case. Thanks
I was able to figure out the way by going through the source code of the labs and deployed the same.
AppsPropertyService service=new AppsPropertyService(applicationName);
service.setUserCredentials(adminUserName,Password);
GenericEntry entry = new GenericEntry();
entry.addProperty("oldOrgUnitPath",oldOrg);
entry.addProperty("orgUnitPath", newOrg);
service.update(new URL("https://www.google.com/a/feeds/orguser/2.0/"+cutomerId+"/"+MailIdofUserToBeMoved), entry);
customerid- is the unique key of the admin.

Resources