Steps for ServiceNow Salesforce Integration:
- Create “Application Registries” entry and fill the required details.
- Go to: System OAuth -> Application Registries.
- Define OAuth Entity Scopes:
- Define all available OAuth scopes for this OAuth provider. You will get this info from your client.
- Go to: System OAuth -> Application Registries -> Open which you have created in point 1 -> Select section “OAuth Entity Scopes”.
- Define OAuth Entity Profiles:
- Update all OAuth Entity Profile Scopes.
- Go to: System OAuth -> Application Registries -> Open which you have created in point 1 -> Select section “OAuth Entity Profiles”.
- Create New Outbound Rest Message:
- Enter required details and submit. Here you will require End point which you will get from your client to push the data.
- Go to: System Web Service -> Outbound – >Rest Message.
- Validate the Get OAuth Token: Click on related link called “Get OAuth Token” to validate the Rest Message.
- By default one HTTP “GET” method will get created.
- Create new HTTP “POST” method to push data in Salesforce. Here you have to define Authentication and HTTP Request (HTTP Header and HTTP Query Parameter).
- Validate the OAuth Token again for Http “POST” method request.
- Click on related link call “Test” to validate the connection.
- Ask your client to validate the Account record which created from ServiceNow.
Automate this Account creation process
- Create one before insert/update Business rule.
- Update HTTP Query Parameter with variable.
- Click on related link called “Auto-generate variables” to create variable substitution.
- Click on related link called “Preview Script Usage” and copy the sample script.
- Past the copied sample script in your business rule.
- Set the variables which you wanna pass to Salesforce.
- Write logic to update the response which will come from Salesforce on ServiceNow record.
- Create new record to test the functionality and verified it both end.
Use full link for Salesforce
- Rest API : https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
- Salesforce Field Reference Guide: https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_Account.htm
- OAuth Endpoints: https://help.salesforce.com/articleView?id=remoteaccess_oauth_endpoints.htm&type=5