Created
May 23, 2020 10:28
-
-
Save SahSantoshh/631a4b4e3b73fd4856a32496f90c65f3 to your computer and use it in GitHub Desktop.
create_contact_push_topic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_contact_push_topic | |
# Create a PushTopic for subscribing to Contact changes. | |
contact_topic = @client.create!('PushTopic', | |
ApiVersion: '48.0', | |
Name: ENV['CONTACT_PUSH_TOPIC_NAME'], | |
Description: 'all contact records', | |
NotifyForOperations: 'All', | |
NotifyForFields: 'All', | |
Query: 'select Id, FirstName, LastName, Title, Email, Phone, MobilePhone, OtherPhone, AccountId, OwnerId, IsDeleted from Contact') | |
Logger.new(LOG_PATH).info('Contact Push Topic Id: ' + contact_topic) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment