Showing posts with label #trailhead. Show all posts
Showing posts with label #trailhead. Show all posts

Tuesday, 12 September 2017

Using FLOW from an Object-Specific Action (Beta) - Salesforce Winter'18 ☃️


We can add FLOWS to the action menu on your Lightning pages     
without hunting down the Flow’s URL. When we create a flow 
action, we can pick from a list of available flows rather than
enter the flow URL manually.  As of now its in beta, so soon we will have more updates on this feature.

Flow actions can’t be global actions, and they can’t be deployed 
to other orgs, such as with packaging.

This feature is available in the Lightning Experience and all versions 
of Salesforce1 mobile app.

For this, the FLOW which you are using in the Flow Actions, 
must be active and have Screens.




Steps for Creating Flow Action and adding it into the Object:


I have just created a FLOWS on Opportunity object to show how the FLOWS worked when we add this into the Actions.

Below is my activated FLOW on the Opportunity object where I am creating a new record.





After that, we will create a Flow Action. For this go to Setup -> Object (Standard/Custom on which you have created your FLOW) -> Buttons,Links, and Actions ->  New Actions 




Here is my new FLOW Action on opportunity object:





You can add flow actions to an object’s page layout using the page layout editor. To see your org’s flow actions in the page layout editor, check out the Salesforce1 & Lightning Actions category in the palette.




You can see, my "Quick Create" Flow action is added into my Opportunity object.




Here’s how that action appears in the Salesforce1 action bar for Opportunities.



Here is the demo of how records are creating in Opportunities object using this "Quick Create" Flow action.







Related Information


1. Trailhead Project: Create a Satisfaction Survey 
2. Trailhead Module: Build a Discount Calculator
3. Salesforce Winter'18 Release Notes


Stay tuned 📣 for more Winter'18 features.

Thank you!!!

Tuesday, 29 August 2017

Get Started with Salesforce Einstein Vision Setup 👨‍🎓


INTRODUCTION


Last year in #DF16, Salesforce announced their new feature called SalesforceEinstein, a new AI (Artificial Intelligence) platform built into the very core of Salesforce CRM platform. The basic purpose of this new feature is to deliver advanced AI capabilities to sales, service, and marketing- which will enable anyone to use clicks or code for building AI-powered apps that will get smarter with every interaction.





Signup with your Salesforce Einstein Account


1. Go to the sign-up page at https://einstein.ai/. You will get the free sign-up in the right most corner at the top.


2. Once you click on the free sign-up, this page will be opened. Join the Einstein platform by either using your salesforce account or Heroku account.



3. Once you click on sign-up using Salesforce, it will ask for your salesforce account.


4. Click Allow so the page can access basic information, such as your email address, and perform requests.


5. On the activation page:
  • if you are using Google Chrome (supports only latest version), just click on Download Key to save the key locally.The key file is named einstein_platform.pem
  • if you are using any other browser, cut and paste your key from the browser into a text file and save it as einstein_platform.pem

6. You can upload this Key into your org so that Apex controller class can access it. For this you have to login into your Salesforce org which you have used during the account signed up. After the select Files, then click on Upload Files button and upload the key file which you have downloaded.



Generate a Token


Each API call must contain a valid OAuth token in the request header. To generate a token, you create a JWT (JSON WEB TOKEN) payload, sign the payload with your private key, and then call the API to get the token.To get a token without code, we can also Setup Authorization.

Steps to setup Authorization:


1. Use this token page to upload your key file and generate a JWT token.
2. Type your Email Address or Account Id. If you signed up using Salesforce, use your email address associated with that org. Or if you signed up using Heroku, use the Account Id contained in the EINSTEIN_VISION_ACCOUNT_ID config variable. 






Click on choose file and select the key from your laptop which you have downloaded when you signed up for an account. You can set the number of minutes after which the token expires.Then click on Get Token button, you will get the token key.


Get the Code

To get the code, first you need to create account on Github (if you don't have account). Now you can get all the code in the Github.Once you created the account, follow these steps to download and clone the code from the Github:

1. Open this url for JWT repo: https://github.com/salesforceidentity/jwt

2. Click on Clone or download button.
3. Select Download ZIP to download the classes that handle the  JWT (JSON WEB TOKEN).
4. Again, open this url for Apex code repo: https://github.com/MetaMind/apex-utils
5. Repeat step 2 & 3.

If you already have installed Github, you can directly clone the repos using git bash.



Create your Remote Site Settings
Create a new Remote Site Setting as shown below and use this as Remote Site URL: https://api.metamind.io




You are done with the setup. Now you can write your Apex class and their related Visualforce pages into your org.
If you get stuck while setting up, check out the Einstein Platform Services developer forum on Salesforce Developers.


Related Information

1. Trailhead Project: Quick Start: Einstein Vision