gong_api 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +906 -0
- data/Rakefile +8 -0
- data/config.json +12 -0
- data/docs/Actor.md +10 -0
- data/docs/AggregateActivity.md +21 -0
- data/docs/AggregateActivityWithDates.md +23 -0
- data/docs/Answer.md +12 -0
- data/docs/AnsweredScorecard.md +16 -0
- data/docs/AnsweredScorecards.md +9 -0
- data/docs/AnsweredScorecardsFilter.md +12 -0
- data/docs/AssociationObject.md +8 -0
- data/docs/AsyncProcessingResponse.md +8 -0
- data/docs/AuditingApi.md +61 -0
- data/docs/BaseResponse.md +7 -0
- data/docs/CRMApi.md +490 -0
- data/docs/Call.md +13 -0
- data/docs/CallAccessDetails.md +8 -0
- data/docs/CallAccessWithPermissionLevel.md +8 -0
- data/docs/CallBasicData.md +25 -0
- data/docs/CallCollaboration.md +7 -0
- data/docs/CallContent.md +11 -0
- data/docs/CallContext.md +8 -0
- data/docs/CallInteraction.md +10 -0
- data/docs/CallParticipant.md +13 -0
- data/docs/CallReference.md +9 -0
- data/docs/CallTranscript.md +8 -0
- data/docs/CallTranscripts.md +9 -0
- data/docs/CallUploadContext.md +8 -0
- data/docs/CallUsersAccessDto.md +8 -0
- data/docs/Calls.md +9 -0
- data/docs/CallsAccessDetailsResponse.md +8 -0
- data/docs/CallsAccessGetDto.md +7 -0
- data/docs/CallsApi.md +349 -0
- data/docs/CallsFilter.md +10 -0
- data/docs/CallsRequestFilterWithOwners.md +11 -0
- data/docs/CallsResponse.md +9 -0
- data/docs/CallsUsersAccessAddDto.md +7 -0
- data/docs/CallsUsersAccessDeleteDto.md +7 -0
- data/docs/CoachingAccessWithPermissionLevel.md +8 -0
- data/docs/Collaboration.md +7 -0
- data/docs/Comment.md +14 -0
- data/docs/CompanyUsersAggregateActivityResponse.md +12 -0
- data/docs/CompanyUsersIntercationStatsResponse.md +12 -0
- data/docs/Content.md +10 -0
- data/docs/ContentSelector.md +9 -0
- data/docs/ContentSharedEvent.md +23 -0
- data/docs/ContentViewedEvent.md +23 -0
- data/docs/ContextField.md +8 -0
- data/docs/CrmPartyContextField.md +8 -0
- data/docs/CustomActionEvent.md +22 -0
- data/docs/CustomerData.md +8 -0
- data/docs/CustomerDataObject.md +11 -0
- data/docs/CustomerEngagement.md +13 -0
- data/docs/DailyActivityWithDates.md +23 -0
- data/docs/DataPrivacyApi.md +195 -0
- data/docs/DealsAccessWithPermissionLevel.md +8 -0
- data/docs/DeleteMeetingRequest.md +7 -0
- data/docs/EmailAddressReferences.md +12 -0
- data/docs/EmailMessage.md +11 -0
- data/docs/EmailsAccessWithPermissionLevel.md +8 -0
- data/docs/EngagementInBetaPhaseApi.md +148 -0
- data/docs/ErrorResponse.md +8 -0
- data/docs/EventAcceptedResponse.md +7 -0
- data/docs/ExposedFields.md +11 -0
- data/docs/ExternalCallObject.md +10 -0
- data/docs/ExternalCrmCallObject.md +9 -0
- data/docs/ExternalCrmPartyObject.md +9 -0
- data/docs/ExternalPartyObject.md +10 -0
- data/docs/ExternalSystem.md +8 -0
- data/docs/ExternalSystemObject.md +8 -0
- data/docs/ForecastAccessWithPermissionLevel.md +8 -0
- data/docs/GenericCrmIntegration.md +9 -0
- data/docs/GenericCrmRegistrationRequest.md +8 -0
- data/docs/GenericDealStageRequest.md +10 -0
- data/docs/GenericProperty.md +9 -0
- data/docs/GenericSchemaFieldRequest.md +14 -0
- data/docs/GetGenericCrmObjectsResponse.md +8 -0
- data/docs/IdMediaBody.md +7 -0
- data/docs/InsightsAccessWithPermissionLevel.md +8 -0
- data/docs/IntegrationStatusRequest.md +7 -0
- data/docs/IntegrationStatusResponse.md +8 -0
- data/docs/Interaction.md +10 -0
- data/docs/InteractionStat.md +8 -0
- data/docs/InteractionStats.md +9 -0
- data/docs/LibraryApi.md +103 -0
- data/docs/LibraryCall.md +13 -0
- data/docs/LibraryFolder.md +11 -0
- data/docs/LibraryFolderAccess.md +11 -0
- data/docs/LibraryFolderListOfCallsResponse.md +12 -0
- data/docs/LibraryResponse.md +8 -0
- data/docs/LineErrorResponse.md +8 -0
- data/docs/ListGenericCrmIntegrationsResponse.md +8 -0
- data/docs/ListSelectedFieldsResponse.md +8 -0
- data/docs/LogEntry.md +15 -0
- data/docs/LogsResponse.md +9 -0
- data/docs/ManualAssociationResponse.md +9 -0
- data/docs/ManualAssociationsBasicData.md +10 -0
- data/docs/MapUsersBody.md +7 -0
- data/docs/Media.md +8 -0
- data/docs/Meeting.md +7 -0
- data/docs/MeetingInvitee.md +10 -0
- data/docs/MeetingsErrorResponse.md +11 -0
- data/docs/MeetingsInBetaPhaseApi.md +199 -0
- data/docs/Monologue.md +9 -0
- data/docs/MultipleUsersRequestWithCreationDates.md +10 -0
- data/docs/MultipleUsersWithDates.md +9 -0
- data/docs/NewCallAddingRequest.md +25 -0
- data/docs/NewCallAddingResponse.md +8 -0
- data/docs/NewCallRecordingResponse.md +9 -0
- data/docs/NewMeetingRequest.md +12 -0
- data/docs/NewMeetingResponse.md +10 -0
- data/docs/ObjectEntitiesBody.md +7 -0
- data/docs/Occurrences.md +8 -0
- data/docs/Party.md +16 -0
- data/docs/PartyContext.md +8 -0
- data/docs/PartyContextField.md +8 -0
- data/docs/PartyUploadContext.md +8 -0
- data/docs/PermissionProfileDTO.md +41 -0
- data/docs/PermissionProfileResponse.md +8 -0
- data/docs/PermissionProfileUsersResponse.md +8 -0
- data/docs/PermissionProfilesResponse.md +8 -0
- data/docs/PermissionsApi.md +387 -0
- data/docs/PhoneNumberReferences.md +14 -0
- data/docs/PointOfInterest.md +10 -0
- data/docs/PointsOfInterest.md +7 -0
- data/docs/Question.md +13 -0
- data/docs/Questions.md +8 -0
- data/docs/Records.md +10 -0
- data/docs/RegisterGenericCrmResponse.md +8 -0
- data/docs/RequestAnsweredScorecardsFilter.md +8 -0
- data/docs/RequestCallsAccessGetDto.md +7 -0
- data/docs/RequestCallsFilter.md +8 -0
- data/docs/RequestCallsRequestFilterWithOwnersContentSelector.md +9 -0
- data/docs/RequestMultipleUsersRequestWithCreationDates.md +8 -0
- data/docs/RequestMultipleUsersWithDates.md +8 -0
- data/docs/RequestStatusResponse.md +11 -0
- data/docs/RequestWithTimePeriodMultipleUsersWithDates.md +9 -0
- data/docs/SchemaUpdateResponse.md +7 -0
- data/docs/Scorecard.md +14 -0
- data/docs/Scorecards.md +8 -0
- data/docs/Sentence.md +9 -0
- data/docs/Settings.md +12 -0
- data/docs/SettingsApi.md +91 -0
- data/docs/SettingsHistory.md +8 -0
- data/docs/Sharer.md +9 -0
- data/docs/Snippet.md +8 -0
- data/docs/Speaker.md +9 -0
- data/docs/SpeakersTimeline.md +8 -0
- data/docs/SpecificCall.md +8 -0
- data/docs/SpeechSegment.md +9 -0
- data/docs/SpokenLanguage.md +8 -0
- data/docs/StatsApi.md +242 -0
- data/docs/Structure.md +8 -0
- data/docs/Topic.md +8 -0
- data/docs/Tracker.md +12 -0
- data/docs/TrackerPhrases.md +9 -0
- data/docs/UpdateMeetingRequest.md +12 -0
- data/docs/UpdateMeetingResponse.md +8 -0
- data/docs/User.md +8 -0
- data/docs/UserAccessDetails.md +7 -0
- data/docs/UserActivity.md +9 -0
- data/docs/UserAggregateByPeriodActivities.md +9 -0
- data/docs/UserDayByDayActivity.md +9 -0
- data/docs/UserIntegrationStatus.md +12 -0
- data/docs/UserMetadata.md +21 -0
- data/docs/UserSettingsHistory.md +9 -0
- data/docs/UserSimpleMetadata.md +9 -0
- data/docs/UsersAggregateByPeriodActivity.md +9 -0
- data/docs/UsersApi.md +198 -0
- data/docs/UsersDayByDayActivity.md +9 -0
- data/docs/UsersMetadata.md +9 -0
- data/docs/Video.md +8 -0
- data/docs/WorkspaceMetadata.md +9 -0
- data/docs/WorkspacesMetadata.md +8 -0
- data/git_push.sh +55 -0
- data/gong-swagger.json +1 -0
- data/gong_api.gemspec +38 -0
- data/lib/gong_api/api/auditing_api.rb +94 -0
- data/lib/gong_api/api/calls_api.rb +437 -0
- data/lib/gong_api/api/crm_api.rb +651 -0
- data/lib/gong_api/api/data_privacy_api.rb +248 -0
- data/lib/gong_api/api/engagement_in_beta_phase_api.rb +194 -0
- data/lib/gong_api/api/library_api.rb +126 -0
- data/lib/gong_api/api/meetings_in_beta_phase_api.rb +264 -0
- data/lib/gong_api/api/permissions_api.rb +495 -0
- data/lib/gong_api/api/settings_api.rb +120 -0
- data/lib/gong_api/api/stats_api.rb +310 -0
- data/lib/gong_api/api/users_api.rb +246 -0
- data/lib/gong_api/api_client.rb +387 -0
- data/lib/gong_api/api_error.rb +57 -0
- data/lib/gong_api/configuration.rb +198 -0
- data/lib/gong_api/models/actor.rb +239 -0
- data/lib/gong_api/models/aggregate_activity.rb +348 -0
- data/lib/gong_api/models/aggregate_activity_with_dates.rb +368 -0
- data/lib/gong_api/models/answer.rb +257 -0
- data/lib/gong_api/models/answered_scorecard.rb +332 -0
- data/lib/gong_api/models/answered_scorecards.rb +228 -0
- data/lib/gong_api/models/answered_scorecards_filter.rb +258 -0
- data/lib/gong_api/models/association_object.rb +217 -0
- data/lib/gong_api/models/async_processing_response.rb +217 -0
- data/lib/gong_api/models/base_response.rb +207 -0
- data/lib/gong_api/models/call.rb +267 -0
- data/lib/gong_api/models/call_access_details.rb +220 -0
- data/lib/gong_api/models/call_access_with_permission_level.rb +254 -0
- data/lib/gong_api/models/call_basic_data.rb +446 -0
- data/lib/gong_api/models/call_collaboration.rb +208 -0
- data/lib/gong_api/models/call_content.rb +248 -0
- data/lib/gong_api/models/call_context.rb +254 -0
- data/lib/gong_api/models/call_interaction.rb +238 -0
- data/lib/gong_api/models/call_participant.rb +269 -0
- data/lib/gong_api/models/call_reference.rb +230 -0
- data/lib/gong_api/models/call_transcript.rb +219 -0
- data/lib/gong_api/models/call_transcripts.rb +228 -0
- data/lib/gong_api/models/call_upload_context.rb +259 -0
- data/lib/gong_api/models/call_users_access_dto.rb +228 -0
- data/lib/gong_api/models/calls.rb +228 -0
- data/lib/gong_api/models/calls_access_details_response.rb +219 -0
- data/lib/gong_api/models/calls_access_get_dto.rb +212 -0
- data/lib/gong_api/models/calls_filter.rb +238 -0
- data/lib/gong_api/models/calls_request_filter_with_owners.rb +248 -0
- data/lib/gong_api/models/calls_response.rb +228 -0
- data/lib/gong_api/models/calls_users_access_add_dto.rb +209 -0
- data/lib/gong_api/models/calls_users_access_delete_dto.rb +209 -0
- data/lib/gong_api/models/coaching_access_with_permission_level.rb +254 -0
- data/lib/gong_api/models/collaboration.rb +210 -0
- data/lib/gong_api/models/comment.rb +277 -0
- data/lib/gong_api/models/company_users_aggregate_activity_response.rb +258 -0
- data/lib/gong_api/models/company_users_intercation_stats_response.rb +258 -0
- data/lib/gong_api/models/content.rb +243 -0
- data/lib/gong_api/models/content_selector.rb +263 -0
- data/lib/gong_api/models/content_shared_event.rb +400 -0
- data/lib/gong_api/models/content_viewed_event.rb +432 -0
- data/lib/gong_api/models/context_field.rb +218 -0
- data/lib/gong_api/models/crm_party_context_field.rb +218 -0
- data/lib/gong_api/models/custom_action_event.rb +407 -0
- data/lib/gong_api/models/customer_data.rb +253 -0
- data/lib/gong_api/models/customer_data_object.rb +283 -0
- data/lib/gong_api/models/customer_engagement.rb +301 -0
- data/lib/gong_api/models/daily_activity_with_dates.rb +368 -0
- data/lib/gong_api/models/deals_access_with_permission_level.rb +254 -0
- data/lib/gong_api/models/delete_meeting_request.rb +208 -0
- data/lib/gong_api/models/email_address_references.rb +267 -0
- data/lib/gong_api/models/email_message.rb +247 -0
- data/lib/gong_api/models/emails_access_with_permission_level.rb +254 -0
- data/lib/gong_api/models/error_response.rb +217 -0
- data/lib/gong_api/models/event_accepted_response.rb +207 -0
- data/lib/gong_api/models/exposed_fields.rb +245 -0
- data/lib/gong_api/models/external_call_object.rb +286 -0
- data/lib/gong_api/models/external_crm_call_object.rb +274 -0
- data/lib/gong_api/models/external_crm_party_object.rb +274 -0
- data/lib/gong_api/models/external_party_object.rb +286 -0
- data/lib/gong_api/models/external_system.rb +253 -0
- data/lib/gong_api/models/external_system_object.rb +251 -0
- data/lib/gong_api/models/forecast_access_with_permission_level.rb +254 -0
- data/lib/gong_api/models/generic_crm_integration.rb +227 -0
- data/lib/gong_api/models/generic_crm_registration_request.rb +227 -0
- data/lib/gong_api/models/generic_deal_stage_request.rb +257 -0
- data/lib/gong_api/models/generic_property.rb +276 -0
- data/lib/gong_api/models/generic_schema_field_request.rb +328 -0
- data/lib/gong_api/models/get_generic_crm_objects_response.rb +219 -0
- data/lib/gong_api/models/id_media_body.rb +206 -0
- data/lib/gong_api/models/insights_access_with_permission_level.rb +254 -0
- data/lib/gong_api/models/integration_status_request.rb +209 -0
- data/lib/gong_api/models/integration_status_response.rb +219 -0
- data/lib/gong_api/models/interaction.rb +243 -0
- data/lib/gong_api/models/interaction_stat.rb +217 -0
- data/lib/gong_api/models/interaction_stats.rb +228 -0
- data/lib/gong_api/models/library_call.rb +267 -0
- data/lib/gong_api/models/library_folder.rb +248 -0
- data/lib/gong_api/models/library_folder_access.rb +284 -0
- data/lib/gong_api/models/library_folder_list_of_calls_response.rb +259 -0
- data/lib/gong_api/models/library_response.rb +219 -0
- data/lib/gong_api/models/line_error_response.rb +217 -0
- data/lib/gong_api/models/list_generic_crm_integrations_response.rb +219 -0
- data/lib/gong_api/models/list_selected_fields_response.rb +219 -0
- data/lib/gong_api/models/log_entry.rb +287 -0
- data/lib/gong_api/models/logs_response.rb +228 -0
- data/lib/gong_api/models/manual_association_response.rb +228 -0
- data/lib/gong_api/models/manual_associations_basic_data.rb +240 -0
- data/lib/gong_api/models/map_users_body.rb +206 -0
- data/lib/gong_api/models/media.rb +218 -0
- data/lib/gong_api/models/meeting.rb +207 -0
- data/lib/gong_api/models/meeting_invitee.rb +237 -0
- data/lib/gong_api/models/meetings_error_response.rb +247 -0
- data/lib/gong_api/models/monologue.rb +229 -0
- data/lib/gong_api/models/multiple_users_request_with_creation_dates.rb +238 -0
- data/lib/gong_api/models/multiple_users_with_dates.rb +238 -0
- data/lib/gong_api/models/new_call_adding_request.rb +450 -0
- data/lib/gong_api/models/new_call_adding_response.rb +217 -0
- data/lib/gong_api/models/new_call_recording_response.rb +227 -0
- data/lib/gong_api/models/new_meeting_request.rb +265 -0
- data/lib/gong_api/models/new_meeting_response.rb +239 -0
- data/lib/gong_api/models/object_entities_body.rb +206 -0
- data/lib/gong_api/models/occurrences.rb +217 -0
- data/lib/gong_api/models/party.rb +335 -0
- data/lib/gong_api/models/party_context.rb +254 -0
- data/lib/gong_api/models/party_context_field.rb +218 -0
- data/lib/gong_api/models/party_upload_context.rb +259 -0
- data/lib/gong_api/models/permission_profile_dto.rb +541 -0
- data/lib/gong_api/models/permission_profile_response.rb +216 -0
- data/lib/gong_api/models/permission_profile_users_response.rb +219 -0
- data/lib/gong_api/models/permission_profiles_response.rb +219 -0
- data/lib/gong_api/models/phone_number_references.rb +289 -0
- data/lib/gong_api/models/point_of_interest.rb +237 -0
- data/lib/gong_api/models/points_of_interest.rb +210 -0
- data/lib/gong_api/models/question.rb +267 -0
- data/lib/gong_api/models/questions.rb +218 -0
- data/lib/gong_api/models/records.rb +238 -0
- data/lib/gong_api/models/register_generic_crm_response.rb +217 -0
- data/lib/gong_api/models/request_answered_scorecards_filter.rb +216 -0
- data/lib/gong_api/models/request_calls_access_get_dto.rb +206 -0
- data/lib/gong_api/models/request_calls_filter.rb +216 -0
- data/lib/gong_api/models/request_calls_request_filter_with_owners_content_selector.rb +225 -0
- data/lib/gong_api/models/request_multiple_users_request_with_creation_dates.rb +216 -0
- data/lib/gong_api/models/request_multiple_users_with_dates.rb +216 -0
- data/lib/gong_api/models/request_status_response.rb +282 -0
- data/lib/gong_api/models/request_with_time_period_multiple_users_with_dates.rb +265 -0
- data/lib/gong_api/models/schema_update_response.rb +207 -0
- data/lib/gong_api/models/scorecard.rb +279 -0
- data/lib/gong_api/models/scorecards.rb +219 -0
- data/lib/gong_api/models/sentence.rb +227 -0
- data/lib/gong_api/models/settings.rb +258 -0
- data/lib/gong_api/models/settings_history.rb +219 -0
- data/lib/gong_api/models/sharer.rb +227 -0
- data/lib/gong_api/models/snippet.rb +218 -0
- data/lib/gong_api/models/speaker.rb +228 -0
- data/lib/gong_api/models/speakers_timeline.rb +219 -0
- data/lib/gong_api/models/specific_call.rb +216 -0
- data/lib/gong_api/models/speech_segment.rb +244 -0
- data/lib/gong_api/models/spoken_language.rb +218 -0
- data/lib/gong_api/models/structure.rb +218 -0
- data/lib/gong_api/models/topic.rb +217 -0
- data/lib/gong_api/models/tracker.rb +295 -0
- data/lib/gong_api/models/tracker_phrases.rb +229 -0
- data/lib/gong_api/models/update_meeting_request.rb +265 -0
- data/lib/gong_api/models/update_meeting_response.rb +217 -0
- data/lib/gong_api/models/user.rb +216 -0
- data/lib/gong_api/models/user_access_details.rb +208 -0
- data/lib/gong_api/models/user_activity.rb +226 -0
- data/lib/gong_api/models/user_aggregate_by_period_activities.rb +229 -0
- data/lib/gong_api/models/user_day_by_day_activity.rb +229 -0
- data/lib/gong_api/models/user_integration_status.rb +257 -0
- data/lib/gong_api/models/user_metadata.rb +347 -0
- data/lib/gong_api/models/user_settings_history.rb +261 -0
- data/lib/gong_api/models/user_simple_metadata.rb +227 -0
- data/lib/gong_api/models/users_aggregate_by_period_activity.rb +228 -0
- data/lib/gong_api/models/users_day_by_day_activity.rb +228 -0
- data/lib/gong_api/models/users_metadata.rb +228 -0
- data/lib/gong_api/models/video.rb +218 -0
- data/lib/gong_api/models/workspace_metadata.rb +227 -0
- data/lib/gong_api/models/workspaces_metadata.rb +219 -0
- data/lib/gong_api/version.rb +14 -0
- data/lib/gong_api.rb +209 -0
- data/spec/api/auditing_api_spec.rb +49 -0
- data/spec/api/calls_api_spec.rb +123 -0
- data/spec/api/crm_api_spec.rb +161 -0
- data/spec/api/data_privacy_api_spec.rb +82 -0
- data/spec/api/engagement_in_beta_phase_api_spec.rb +70 -0
- data/spec/api/library_api_spec.rb +58 -0
- data/spec/api/meetings_in_beta_phase_api_spec.rb +84 -0
- data/spec/api/permissions_api_spec.rb +132 -0
- data/spec/api/settings_api_spec.rb +56 -0
- data/spec/api/stats_api_spec.rb +94 -0
- data/spec/api/users_api_spec.rb +83 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/actor_spec.rb +58 -0
- data/spec/models/aggregate_activity_spec.rb +124 -0
- data/spec/models/aggregate_activity_with_dates_spec.rb +136 -0
- data/spec/models/answer_spec.rb +70 -0
- data/spec/models/answered_scorecard_spec.rb +98 -0
- data/spec/models/answered_scorecards_filter_spec.rb +70 -0
- data/spec/models/answered_scorecards_spec.rb +52 -0
- data/spec/models/association_object_spec.rb +46 -0
- data/spec/models/async_processing_response_spec.rb +46 -0
- data/spec/models/base_response_spec.rb +40 -0
- data/spec/models/call_access_details_spec.rb +46 -0
- data/spec/models/call_access_with_permission_level_spec.rb +50 -0
- data/spec/models/call_basic_data_spec.rb +160 -0
- data/spec/models/call_collaboration_spec.rb +40 -0
- data/spec/models/call_content_spec.rb +64 -0
- data/spec/models/call_context_spec.rb +50 -0
- data/spec/models/call_interaction_spec.rb +58 -0
- data/spec/models/call_participant_spec.rb +76 -0
- data/spec/models/call_reference_spec.rb +52 -0
- data/spec/models/call_spec.rb +76 -0
- data/spec/models/call_transcript_spec.rb +46 -0
- data/spec/models/call_transcripts_spec.rb +52 -0
- data/spec/models/call_upload_context_spec.rb +50 -0
- data/spec/models/call_users_access_dto_spec.rb +46 -0
- data/spec/models/calls_access_details_response_spec.rb +46 -0
- data/spec/models/calls_access_get_dto_spec.rb +40 -0
- data/spec/models/calls_filter_spec.rb +58 -0
- data/spec/models/calls_request_filter_with_owners_spec.rb +64 -0
- data/spec/models/calls_response_spec.rb +52 -0
- data/spec/models/calls_spec.rb +52 -0
- data/spec/models/calls_users_access_add_dto_spec.rb +40 -0
- data/spec/models/calls_users_access_delete_dto_spec.rb +40 -0
- data/spec/models/coaching_access_with_permission_level_spec.rb +50 -0
- data/spec/models/collaboration_spec.rb +40 -0
- data/spec/models/comment_spec.rb +82 -0
- data/spec/models/company_users_aggregate_activity_response_spec.rb +70 -0
- data/spec/models/company_users_intercation_stats_response_spec.rb +70 -0
- data/spec/models/content_selector_spec.rb +60 -0
- data/spec/models/content_shared_event_spec.rb +136 -0
- data/spec/models/content_spec.rb +58 -0
- data/spec/models/content_viewed_event_spec.rb +140 -0
- data/spec/models/context_field_spec.rb +46 -0
- data/spec/models/crm_party_context_field_spec.rb +46 -0
- data/spec/models/custom_action_event_spec.rb +134 -0
- data/spec/models/customer_data_object_spec.rb +68 -0
- data/spec/models/customer_data_spec.rb +50 -0
- data/spec/models/customer_engagement_spec.rb +80 -0
- data/spec/models/daily_activity_with_dates_spec.rb +136 -0
- data/spec/models/deals_access_with_permission_level_spec.rb +50 -0
- data/spec/models/delete_meeting_request_spec.rb +40 -0
- data/spec/models/email_address_references_spec.rb +70 -0
- data/spec/models/email_message_spec.rb +64 -0
- data/spec/models/emails_access_with_permission_level_spec.rb +50 -0
- data/spec/models/error_response_spec.rb +46 -0
- data/spec/models/event_accepted_response_spec.rb +40 -0
- data/spec/models/exposed_fields_spec.rb +64 -0
- data/spec/models/external_call_object_spec.rb +66 -0
- data/spec/models/external_crm_call_object_spec.rb +56 -0
- data/spec/models/external_crm_party_object_spec.rb +56 -0
- data/spec/models/external_party_object_spec.rb +66 -0
- data/spec/models/external_system_object_spec.rb +50 -0
- data/spec/models/external_system_spec.rb +50 -0
- data/spec/models/forecast_access_with_permission_level_spec.rb +50 -0
- data/spec/models/generic_crm_integration_spec.rb +52 -0
- data/spec/models/generic_crm_registration_request_spec.rb +46 -0
- data/spec/models/generic_deal_stage_request_spec.rb +58 -0
- data/spec/models/generic_property_spec.rb +56 -0
- data/spec/models/generic_schema_field_request_spec.rb +86 -0
- data/spec/models/get_generic_crm_objects_response_spec.rb +46 -0
- data/spec/models/id_media_body_spec.rb +40 -0
- data/spec/models/insights_access_with_permission_level_spec.rb +50 -0
- data/spec/models/integration_status_request_spec.rb +40 -0
- data/spec/models/integration_status_response_spec.rb +46 -0
- data/spec/models/interaction_spec.rb +58 -0
- data/spec/models/interaction_stat_spec.rb +46 -0
- data/spec/models/interaction_stats_spec.rb +52 -0
- data/spec/models/library_call_spec.rb +76 -0
- data/spec/models/library_folder_access_spec.rb +68 -0
- data/spec/models/library_folder_list_of_calls_response_spec.rb +70 -0
- data/spec/models/library_folder_spec.rb +64 -0
- data/spec/models/library_response_spec.rb +46 -0
- data/spec/models/line_error_response_spec.rb +46 -0
- data/spec/models/list_generic_crm_integrations_response_spec.rb +46 -0
- data/spec/models/list_selected_fields_response_spec.rb +46 -0
- data/spec/models/log_entry_spec.rb +88 -0
- data/spec/models/logs_response_spec.rb +52 -0
- data/spec/models/manual_association_response_spec.rb +52 -0
- data/spec/models/manual_associations_basic_data_spec.rb +58 -0
- data/spec/models/map_users_body_spec.rb +40 -0
- data/spec/models/media_spec.rb +46 -0
- data/spec/models/meeting_invitee_spec.rb +58 -0
- data/spec/models/meeting_spec.rb +40 -0
- data/spec/models/meetings_error_response_spec.rb +64 -0
- data/spec/models/monologue_spec.rb +52 -0
- data/spec/models/multiple_users_request_with_creation_dates_spec.rb +58 -0
- data/spec/models/multiple_users_with_dates_spec.rb +52 -0
- data/spec/models/new_call_adding_request_spec.rb +152 -0
- data/spec/models/new_call_adding_response_spec.rb +46 -0
- data/spec/models/new_call_recording_response_spec.rb +52 -0
- data/spec/models/new_meeting_request_spec.rb +70 -0
- data/spec/models/new_meeting_response_spec.rb +58 -0
- data/spec/models/object_entities_body_spec.rb +40 -0
- data/spec/models/occurrences_spec.rb +46 -0
- data/spec/models/party_context_field_spec.rb +46 -0
- data/spec/models/party_context_spec.rb +50 -0
- data/spec/models/party_spec.rb +102 -0
- data/spec/models/party_upload_context_spec.rb +50 -0
- data/spec/models/permission_profile_dto_spec.rb +244 -0
- data/spec/models/permission_profile_response_spec.rb +46 -0
- data/spec/models/permission_profile_users_response_spec.rb +46 -0
- data/spec/models/permission_profiles_response_spec.rb +46 -0
- data/spec/models/phone_number_references_spec.rb +82 -0
- data/spec/models/point_of_interest_spec.rb +58 -0
- data/spec/models/points_of_interest_spec.rb +40 -0
- data/spec/models/question_spec.rb +76 -0
- data/spec/models/questions_spec.rb +46 -0
- data/spec/models/records_spec.rb +58 -0
- data/spec/models/register_generic_crm_response_spec.rb +46 -0
- data/spec/models/request_answered_scorecards_filter_spec.rb +46 -0
- data/spec/models/request_calls_access_get_dto_spec.rb +40 -0
- data/spec/models/request_calls_filter_spec.rb +46 -0
- data/spec/models/request_calls_request_filter_with_owners_content_selector_spec.rb +52 -0
- data/spec/models/request_multiple_users_request_with_creation_dates_spec.rb +46 -0
- data/spec/models/request_multiple_users_with_dates_spec.rb +46 -0
- data/spec/models/request_status_response_spec.rb +68 -0
- data/spec/models/request_with_time_period_multiple_users_with_dates_spec.rb +56 -0
- data/spec/models/schema_update_response_spec.rb +40 -0
- data/spec/models/scorecard_spec.rb +82 -0
- data/spec/models/scorecards_spec.rb +46 -0
- data/spec/models/sentence_spec.rb +52 -0
- data/spec/models/settings_history_spec.rb +46 -0
- data/spec/models/settings_spec.rb +70 -0
- data/spec/models/sharer_spec.rb +52 -0
- data/spec/models/snippet_spec.rb +46 -0
- data/spec/models/speaker_spec.rb +52 -0
- data/spec/models/speakers_timeline_spec.rb +46 -0
- data/spec/models/specific_call_spec.rb +46 -0
- data/spec/models/speech_segment_spec.rb +52 -0
- data/spec/models/spoken_language_spec.rb +46 -0
- data/spec/models/structure_spec.rb +46 -0
- data/spec/models/topic_spec.rb +46 -0
- data/spec/models/tracker_phrases_spec.rb +52 -0
- data/spec/models/tracker_spec.rb +74 -0
- data/spec/models/update_meeting_request_spec.rb +70 -0
- data/spec/models/update_meeting_response_spec.rb +46 -0
- data/spec/models/user_access_details_spec.rb +40 -0
- data/spec/models/user_activity_spec.rb +52 -0
- data/spec/models/user_aggregate_by_period_activities_spec.rb +52 -0
- data/spec/models/user_day_by_day_activity_spec.rb +52 -0
- data/spec/models/user_integration_status_spec.rb +70 -0
- data/spec/models/user_metadata_spec.rb +124 -0
- data/spec/models/user_settings_history_spec.rb +56 -0
- data/spec/models/user_simple_metadata_spec.rb +52 -0
- data/spec/models/user_spec.rb +46 -0
- data/spec/models/users_aggregate_by_period_activity_spec.rb +52 -0
- data/spec/models/users_day_by_day_activity_spec.rb +52 -0
- data/spec/models/users_metadata_spec.rb +52 -0
- data/spec/models/video_spec.rb +46 -0
- data/spec/models/workspace_metadata_spec.rb +52 -0
- data/spec/models/workspaces_metadata_spec.rb +46 -0
- data/spec/spec_helper.rb +110 -0
- metadata +807 -0
@@ -0,0 +1,651 @@
|
|
1
|
+
=begin
|
2
|
+
#Gong API
|
3
|
+
|
4
|
+
#<h2>Overview</h2> <p> The Gong API allows you to: </p> <ol> <li> Receive the following information from Gong: <ol type=\"a\"> <li> Your company's <a href=\"#tag--Calls\">calls</a> in Gong </li> <li> Your company's <a href=\"#tag--Users\">users</a> in Gong </li> <li> Your company's user <a href=\"#tag--Stats\">stats</a> in Gong </li> <li> Your company's user <a href=\"#tag--Settings\">settings</a> in Gong </li> <li> Your company's <a href=\"#tag--Library\">libraries</a> in Gong </li> </ol></li> <li> <a href=\"#post-/v2/calls\">Upload</a> new or <a href=\"#put-/v2/calls/-id-/media\">update</a> call recordings in Gong, in order to support cases where you have an internal system that records calls or obtains them from a third-party entity. </li> <li> <a href=\"#post-/v2/data-privacy/erase-data-for-email-address\">Data Privacy</a>: Delete users and all their associated elements.</li> <li> Upload <a href=\"#tag--CRM\">CRM</a> data into Gong. </li> </ol> <p>Base URL for all API calls is <a href=\"https://us-55616.api.gong.io\"> https://us-55616.api.gong.io </a> </p> <h2>Authentication</h2> <p> There are two ways to retrieve credentials to the Gong Public API: </p> <ol><li>Retrieve Manually:<br> <p> In the <a href=\"https://app.gong.io/company/api\">Gong API Page</a> (you must be a technical administrator in Gong), click \"Create\" to receive an <b>Access Key</b> and an <b>Access Key Secret</b>.<br> </p> <p> Use the Basic Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc7617.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Basic <token></code><br> </p> <p> To create the basic token, combine the <b>Access Key</b> and the <b>Access Key Secret</b> with colon (:) and then encode in Base64 as following:<br> <code>Base64(<accessKey> : <accessKeySecret>)</code><br><br> </p></li> <li>Retrieve through OAuth<br> <p> To obtain the Bearer token, follow the steps described in the <a target=\"_blank\" href=\"https://help.gong.io/hc/en-us/articles/360056677792\">Gong OAuth Guide</a>. <br></p> <p> After obtaining the token, use the Bearer Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc6750.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Bearer <token></code> </p> </li></ol> <h2>Limits</h2> <p> By default Gong limits your company's access to the service to 3 API calls per second, and 10,000 API calls per day. </p> <p> When the rate of API calls exceeds these limits an HTTP status code <b>429</b> is returned and a <b>Retry-After</b> header indicates how many seconds to wait before making a new request. </p><p> If required, contact help@gong.io to change these limits. </p> <h2>Cursors</h2> <p> Some API calls that return a list are limited in the amount of records they may return, so multiple API calls may be required to bring all records. Such an API call also returns a <b>records</b> field, which contains the number of records in the current page, the current page number and the total number of records. </p> <p> In cases where the total number of records exceeds the number of records thus far retrieved, the <b>records</b> field will also contain a <b>cursor</b> field which can be used to access the next page of records. To retrieve the next page, repeat the API call with the <b>cursor</b> value as supplied by the previous API call. All other request inputs should remain the same. </p> <h2>Forward Compatibility</h2> <p> When coding a system to accept Gong data, take into account that Gong may, without prior warning, add fields to the JSON output. It is recommended to future proof your code so that it disregards all JSON fields you don't actually use. </p><p></p>
|
5
|
+
|
6
|
+
OpenAPI spec version: V2
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.37
|
10
|
+
=end
|
11
|
+
|
12
|
+
module GongAPI
|
13
|
+
class CRMApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Delete a Generic CRM integration (/v2/crm/integration/delete)
|
20
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Deletes a Generic CRM integration and all its associated crm objects (Accounts, Contacts, Deals, Leads, and Users).</p><p>This API is asynchronous. Call \"/request-status\" API with the clientRequestId sent to this API to track progress of the delete request:<br>Status DONE indicates that the integration and all its associated crm objects have been successfully deleted. Calls associations may take up to 24 hours to be deleted.</p><h3>Example</h3><h4>Request</h4><code>DELETE https://api.gong.io/v2/crm/integration/delete?clientRequestId=1234&integrationId=6286478263646</code><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:integration:delete'.</p>
|
21
|
+
# @param client_request_id A unique identifier sent by you to allow troubleshooting requests. Valid characters for this field are letters, numbers, dashes and underscores.
|
22
|
+
# @param integration_id Integration ID generated when creating the integration
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [AsyncProcessingResponse]
|
25
|
+
def delete_generic_crm_integration_using_delete(client_request_id, integration_id, opts = {})
|
26
|
+
data, _status_code, _headers = delete_generic_crm_integration_using_delete_with_http_info(client_request_id, integration_id, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Delete a Generic CRM integration (/v2/crm/integration/delete)
|
31
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Deletes a Generic CRM integration and all its associated crm objects (Accounts, Contacts, Deals, Leads, and Users).</p><p>This API is asynchronous. Call \"/request-status\" API with the clientRequestId sent to this API to track progress of the delete request:<br>Status DONE indicates that the integration and all its associated crm objects have been successfully deleted. Calls associations may take up to 24 hours to be deleted.</p><h3>Example</h3><h4>Request</h4><code>DELETE https://api.gong.io/v2/crm/integration/delete?clientRequestId=1234&integrationId=6286478263646</code><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:integration:delete'.</p>
|
32
|
+
# @param client_request_id A unique identifier sent by you to allow troubleshooting requests. Valid characters for this field are letters, numbers, dashes and underscores.
|
33
|
+
# @param integration_id Integration ID generated when creating the integration
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(AsyncProcessingResponse, Integer, Hash)>] AsyncProcessingResponse data, response status code and response headers
|
36
|
+
def delete_generic_crm_integration_using_delete_with_http_info(client_request_id, integration_id, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.delete_generic_crm_integration_using_delete ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'client_request_id' is set
|
41
|
+
if @api_client.config.client_side_validation && client_request_id.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'client_request_id' when calling CRMApi.delete_generic_crm_integration_using_delete"
|
43
|
+
end
|
44
|
+
# verify the required parameter 'integration_id' is set
|
45
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling CRMApi.delete_generic_crm_integration_using_delete"
|
47
|
+
end
|
48
|
+
# resource path
|
49
|
+
local_var_path = '/v2/crm/integration/delete'
|
50
|
+
|
51
|
+
# query parameters
|
52
|
+
query_params = opts[:query_params] || {}
|
53
|
+
query_params[:'clientRequestId'] = client_request_id
|
54
|
+
query_params[:'integrationId'] = integration_id
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = opts[:header_params] || {}
|
58
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:body]
|
66
|
+
|
67
|
+
return_type = opts[:return_type] || 'AsyncProcessingResponse'
|
68
|
+
|
69
|
+
auth_names = opts[:auth_names] || []
|
70
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type)
|
77
|
+
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: CRMApi#delete_generic_crm_integration_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
# Get CRM objects (/v2/crm/object/list)
|
84
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>This API is intended to be used in <b>development phase only</b>, to manually verify that objects are uploaded and processed correctly in Gong.</p><p>Returns a JSON object where each key is the object crm id and the corresponding value is a nested JSON object representing the CRM object fields. Each key in the nested JSON is the field name and the corresponding value is the field value.</p><p>The objects are fetched from the Gong main DB. If the object is not found, the JSON’s value will be null.</p><p>The request body contains an array of objects ids.</p><p>The request is limited to 100 objects. If more than 100 objects are requested only the first 100 are returned.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:get-objects'.</p>
|
85
|
+
# @param body Requested objects crm ids
|
86
|
+
# @param integration_id Integration ID generated when creating the integration
|
87
|
+
# @param object_type Requested objects type
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [GetGenericCrmObjectsResponse]
|
90
|
+
def get_crm_objects_using_get(body, integration_id, object_type, opts = {})
|
91
|
+
data, _status_code, _headers = get_crm_objects_using_get_with_http_info(body, integration_id, object_type, opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Get CRM objects (/v2/crm/object/list)
|
96
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>This API is intended to be used in <b>development phase only</b>, to manually verify that objects are uploaded and processed correctly in Gong.</p><p>Returns a JSON object where each key is the object crm id and the corresponding value is a nested JSON object representing the CRM object fields. Each key in the nested JSON is the field name and the corresponding value is the field value.</p><p>The objects are fetched from the Gong main DB. If the object is not found, the JSON’s value will be null.</p><p>The request body contains an array of objects ids.</p><p>The request is limited to 100 objects. If more than 100 objects are requested only the first 100 are returned.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:get-objects'.</p>
|
97
|
+
# @param body Requested objects crm ids
|
98
|
+
# @param integration_id Integration ID generated when creating the integration
|
99
|
+
# @param object_type Requested objects type
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [Array<(GetGenericCrmObjectsResponse, Integer, Hash)>] GetGenericCrmObjectsResponse data, response status code and response headers
|
102
|
+
def get_crm_objects_using_get_with_http_info(body, integration_id, object_type, opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.get_crm_objects_using_get ...'
|
105
|
+
end
|
106
|
+
# verify the required parameter 'body' is set
|
107
|
+
if @api_client.config.client_side_validation && body.nil?
|
108
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.get_crm_objects_using_get"
|
109
|
+
end
|
110
|
+
# verify the required parameter 'integration_id' is set
|
111
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
112
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling CRMApi.get_crm_objects_using_get"
|
113
|
+
end
|
114
|
+
# verify the required parameter 'object_type' is set
|
115
|
+
if @api_client.config.client_side_validation && object_type.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'object_type' when calling CRMApi.get_crm_objects_using_get"
|
117
|
+
end
|
118
|
+
# verify enum value
|
119
|
+
if @api_client.config.client_side_validation && !['ACCOUNT', 'CONTACT', 'DEAL', 'LEAD'].include?(object_type)
|
120
|
+
fail ArgumentError, "invalid value for 'object_type', must be one of ACCOUNT, CONTACT, DEAL, LEAD"
|
121
|
+
end
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/v2/crm/object/list'
|
124
|
+
|
125
|
+
# query parameters
|
126
|
+
query_params = opts[:query_params] || {}
|
127
|
+
query_params[:'integrationId'] = integration_id
|
128
|
+
query_params[:'objectType'] = object_type
|
129
|
+
|
130
|
+
# header parameters
|
131
|
+
header_params = opts[:header_params] || {}
|
132
|
+
# HTTP header 'Accept' (if needed)
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
134
|
+
# HTTP header 'Content-Type'
|
135
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['*/*'])
|
136
|
+
|
137
|
+
# form parameters
|
138
|
+
form_params = opts[:form_params] || {}
|
139
|
+
|
140
|
+
# http body (model)
|
141
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
142
|
+
|
143
|
+
return_type = opts[:return_type] || 'GetGenericCrmObjectsResponse'
|
144
|
+
|
145
|
+
auth_names = opts[:auth_names] || []
|
146
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
147
|
+
:header_params => header_params,
|
148
|
+
:query_params => query_params,
|
149
|
+
:form_params => form_params,
|
150
|
+
:body => post_body,
|
151
|
+
:auth_names => auth_names,
|
152
|
+
:return_type => return_type)
|
153
|
+
|
154
|
+
if @api_client.config.debugging
|
155
|
+
@api_client.config.logger.debug "API called: CRMApi#get_crm_objects_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
156
|
+
end
|
157
|
+
return data, status_code, headers
|
158
|
+
end
|
159
|
+
# Get Request Status (/v2/crm/request-status)
|
160
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Returns the current status of the request for \"/map/users\", \"/object/entities\" or \"/integration/delete\" API.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.</p><h3>Status Codes</h3><ul> <li><span class='public-api-parameter'>PENDING</span> - File is pending parsing</li> <li><span class='public-api-note'>IN_PROGRESS</span> - File is being parsed</li> <li><span class='public-api-info'>DONE</span> - All objects in the file were successfully parsed</li> <li><span class='public-api-critical'>FAILED</span> - Failed to parse some objects in the file or on a general error when the file was being processed</li></ul><h3>Status Indication</h3><ul> <li>For \"/object/entities\" API, status <span class='public-api-info'>DONE</span> indicates that all objects in the LDJSON file were successfully parsed and stored in raw storage.<br> Note that it can take up to 1 hour from the time the LDJSON file was uploaded using the \"/object/entities\" API until deals are fully processed and available to the end user on the Deals Board. </li> <li>For \"/map/users\" API, status <span class='public-api-info'>DONE</span> indicates that the mapping was successfully created and is available in Gong for the processing of other objects.</li> <li><span class='public-api-critical'>FAILED</span>: <ul> <li>If you receive a <span class='public-api-critical'>FAILED</span> status with a specific error list there are errors you need to address in the object: <ul> <li>Fix the objects' JSON.</li> <li>Resend the entire LDJSON file to \"/object/entities\" or \"/map/users\" API.<br> Note that The returned errors list is <b>limited to the first 20 errors</b>. To make sure you have corrected all the possible errors you need to upload the entire file repeatedly until you receive a <span class='public-api-info'>DONE</span> status. </li> </ul> </li> <li>If you received a <span class='public-api-critical'>FAILED</span> status with a single error in the form of<br> {\"line\":0,\"description\":\".....\"} this indicates a general processing error: <ul> <li>Fix the LDJSON file according to the error message.</li> <li>Upload the entire LDJSON file again.</li> </ul> </li> </ul> </li></ul>
|
161
|
+
# @param client_request_id <span style='background: rgba(9,30,66,0.08)'>clientRequestId</span> sent to \"/map/users\", \"/object/entities\" or \"/integration/delete\" API
|
162
|
+
# @param integration_id Integration ID generated when creating the integration
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @return [RequestStatusResponse]
|
165
|
+
def get_request_status_using_get(client_request_id, integration_id, opts = {})
|
166
|
+
data, _status_code, _headers = get_request_status_using_get_with_http_info(client_request_id, integration_id, opts)
|
167
|
+
data
|
168
|
+
end
|
169
|
+
|
170
|
+
# Get Request Status (/v2/crm/request-status)
|
171
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Returns the current status of the request for \"/map/users\", \"/object/entities\" or \"/integration/delete\" API.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.</p><h3>Status Codes</h3><ul> <li><span class='public-api-parameter'>PENDING</span> - File is pending parsing</li> <li><span class='public-api-note'>IN_PROGRESS</span> - File is being parsed</li> <li><span class='public-api-info'>DONE</span> - All objects in the file were successfully parsed</li> <li><span class='public-api-critical'>FAILED</span> - Failed to parse some objects in the file or on a general error when the file was being processed</li></ul><h3>Status Indication</h3><ul> <li>For \"/object/entities\" API, status <span class='public-api-info'>DONE</span> indicates that all objects in the LDJSON file were successfully parsed and stored in raw storage.<br> Note that it can take up to 1 hour from the time the LDJSON file was uploaded using the \"/object/entities\" API until deals are fully processed and available to the end user on the Deals Board. </li> <li>For \"/map/users\" API, status <span class='public-api-info'>DONE</span> indicates that the mapping was successfully created and is available in Gong for the processing of other objects.</li> <li><span class='public-api-critical'>FAILED</span>: <ul> <li>If you receive a <span class='public-api-critical'>FAILED</span> status with a specific error list there are errors you need to address in the object: <ul> <li>Fix the objects' JSON.</li> <li>Resend the entire LDJSON file to \"/object/entities\" or \"/map/users\" API.<br> Note that The returned errors list is <b>limited to the first 20 errors</b>. To make sure you have corrected all the possible errors you need to upload the entire file repeatedly until you receive a <span class='public-api-info'>DONE</span> status. </li> </ul> </li> <li>If you received a <span class='public-api-critical'>FAILED</span> status with a single error in the form of<br> {\"line\":0,\"description\":\".....\"} this indicates a general processing error: <ul> <li>Fix the LDJSON file according to the error message.</li> <li>Upload the entire LDJSON file again.</li> </ul> </li> </ul> </li></ul>
|
172
|
+
# @param client_request_id <span style='background: rgba(9,30,66,0.08)'>clientRequestId</span> sent to \"/map/users\", \"/object/entities\" or \"/integration/delete\" API
|
173
|
+
# @param integration_id Integration ID generated when creating the integration
|
174
|
+
# @param [Hash] opts the optional parameters
|
175
|
+
# @return [Array<(RequestStatusResponse, Integer, Hash)>] RequestStatusResponse data, response status code and response headers
|
176
|
+
def get_request_status_using_get_with_http_info(client_request_id, integration_id, opts = {})
|
177
|
+
if @api_client.config.debugging
|
178
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.get_request_status_using_get ...'
|
179
|
+
end
|
180
|
+
# verify the required parameter 'client_request_id' is set
|
181
|
+
if @api_client.config.client_side_validation && client_request_id.nil?
|
182
|
+
fail ArgumentError, "Missing the required parameter 'client_request_id' when calling CRMApi.get_request_status_using_get"
|
183
|
+
end
|
184
|
+
# verify the required parameter 'integration_id' is set
|
185
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
186
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling CRMApi.get_request_status_using_get"
|
187
|
+
end
|
188
|
+
# resource path
|
189
|
+
local_var_path = '/v2/crm/request-status'
|
190
|
+
|
191
|
+
# query parameters
|
192
|
+
query_params = opts[:query_params] || {}
|
193
|
+
query_params[:'clientRequestId'] = client_request_id
|
194
|
+
query_params[:'integrationId'] = integration_id
|
195
|
+
|
196
|
+
# header parameters
|
197
|
+
header_params = opts[:header_params] || {}
|
198
|
+
# HTTP header 'Accept' (if needed)
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
200
|
+
|
201
|
+
# form parameters
|
202
|
+
form_params = opts[:form_params] || {}
|
203
|
+
|
204
|
+
# http body (model)
|
205
|
+
post_body = opts[:body]
|
206
|
+
|
207
|
+
return_type = opts[:return_type] || 'RequestStatusResponse'
|
208
|
+
|
209
|
+
auth_names = opts[:auth_names] || []
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => return_type)
|
217
|
+
|
218
|
+
if @api_client.config.debugging
|
219
|
+
@api_client.config.logger.debug "API called: CRMApi#get_request_status_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
220
|
+
end
|
221
|
+
return data, status_code, headers
|
222
|
+
end
|
223
|
+
# List Schema Fields (/v2/crm/object/schema/list)
|
224
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Retrieves a list of the object schema fields.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.</p><h3>Example</h3><h4>Request</h4><code>GET https://api.gong.io/v2/crm/object/schema/list?integrationId=6286478263646&objectType=ACCOUNT</code><h4>Response</h4><code>{ \"requestId\": \"afjkzqkqglog7ueki5\", \"selectedFields\": { \"ACCOUNT\": [ { \"name\": \"accountTypePicklist\", \"label\": \"Account Type\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"accountTypePicklist2\", \"label\": \"Account Type2\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"fooBar\", \"label\": \"Foo Bar\", \"type\": \"STRING\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null } ] }}</code>
|
225
|
+
# @param integration_id Integration ID generated when creating the integration
|
226
|
+
# @param object_type Type of object to retrieve the schema fields for (case-sensitive). <br>Omitting this parameter returns the schema for all object types.
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @return [ListSelectedFieldsResponse]
|
229
|
+
def list_crm_schema_fields_using_get(integration_id, object_type, opts = {})
|
230
|
+
data, _status_code, _headers = list_crm_schema_fields_using_get_with_http_info(integration_id, object_type, opts)
|
231
|
+
data
|
232
|
+
end
|
233
|
+
|
234
|
+
# List Schema Fields (/v2/crm/object/schema/list)
|
235
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Retrieves a list of the object schema fields.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.</p><h3>Example</h3><h4>Request</h4><code>GET https://api.gong.io/v2/crm/object/schema/list?integrationId=6286478263646&objectType=ACCOUNT</code><h4>Response</h4><code>{ \"requestId\": \"afjkzqkqglog7ueki5\", \"selectedFields\": { \"ACCOUNT\": [ { \"name\": \"accountTypePicklist\", \"label\": \"Account Type\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"accountTypePicklist2\", \"label\": \"Account Type2\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"fooBar\", \"label\": \"Foo Bar\", \"type\": \"STRING\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null } ] }}</code>
|
236
|
+
# @param integration_id Integration ID generated when creating the integration
|
237
|
+
# @param object_type Type of object to retrieve the schema fields for (case-sensitive). <br>Omitting this parameter returns the schema for all object types.
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(ListSelectedFieldsResponse, Integer, Hash)>] ListSelectedFieldsResponse data, response status code and response headers
|
240
|
+
def list_crm_schema_fields_using_get_with_http_info(integration_id, object_type, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.list_crm_schema_fields_using_get ...'
|
243
|
+
end
|
244
|
+
# verify the required parameter 'integration_id' is set
|
245
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling CRMApi.list_crm_schema_fields_using_get"
|
247
|
+
end
|
248
|
+
# verify the required parameter 'object_type' is set
|
249
|
+
if @api_client.config.client_side_validation && object_type.nil?
|
250
|
+
fail ArgumentError, "Missing the required parameter 'object_type' when calling CRMApi.list_crm_schema_fields_using_get"
|
251
|
+
end
|
252
|
+
# verify enum value
|
253
|
+
if @api_client.config.client_side_validation && !['ACCOUNT', 'CONTACT', 'DEAL', 'LEAD'].include?(object_type)
|
254
|
+
fail ArgumentError, "invalid value for 'object_type', must be one of ACCOUNT, CONTACT, DEAL, LEAD"
|
255
|
+
end
|
256
|
+
# resource path
|
257
|
+
local_var_path = '/v2/crm/object/schema/list'
|
258
|
+
|
259
|
+
# query parameters
|
260
|
+
query_params = opts[:query_params] || {}
|
261
|
+
query_params[:'integrationId'] = integration_id
|
262
|
+
query_params[:'objectType'] = object_type
|
263
|
+
|
264
|
+
# header parameters
|
265
|
+
header_params = opts[:header_params] || {}
|
266
|
+
# HTTP header 'Accept' (if needed)
|
267
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
268
|
+
|
269
|
+
# form parameters
|
270
|
+
form_params = opts[:form_params] || {}
|
271
|
+
|
272
|
+
# http body (model)
|
273
|
+
post_body = opts[:body]
|
274
|
+
|
275
|
+
return_type = opts[:return_type] || 'ListSelectedFieldsResponse'
|
276
|
+
|
277
|
+
auth_names = opts[:auth_names] || []
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
279
|
+
:header_params => header_params,
|
280
|
+
:query_params => query_params,
|
281
|
+
:form_params => form_params,
|
282
|
+
:body => post_body,
|
283
|
+
:auth_names => auth_names,
|
284
|
+
:return_type => return_type)
|
285
|
+
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug "API called: CRMApi#list_crm_schema_fields_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
288
|
+
end
|
289
|
+
return data, status_code, headers
|
290
|
+
end
|
291
|
+
# Get Generic CRM integration details (/v2/crm/integration/list)
|
292
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Returns a list of all active Generic CRM integrations of the company. Only integrations created with 'Register a Generic CRM integration' API are returned.<br>Only one active integration is currently supported.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:integrations:read'.</p>
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @return [ListGenericCrmIntegrationsResponse]
|
295
|
+
def list_generic_crm_integration_using_get(opts = {})
|
296
|
+
data, _status_code, _headers = list_generic_crm_integration_using_get_with_http_info(opts)
|
297
|
+
data
|
298
|
+
end
|
299
|
+
|
300
|
+
# Get Generic CRM integration details (/v2/crm/integration/list)
|
301
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Returns a list of all active Generic CRM integrations of the company. Only integrations created with 'Register a Generic CRM integration' API are returned.<br>Only one active integration is currently supported.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:integrations:read'.</p>
|
302
|
+
# @param [Hash] opts the optional parameters
|
303
|
+
# @return [Array<(ListGenericCrmIntegrationsResponse, Integer, Hash)>] ListGenericCrmIntegrationsResponse data, response status code and response headers
|
304
|
+
def list_generic_crm_integration_using_get_with_http_info(opts = {})
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.list_generic_crm_integration_using_get ...'
|
307
|
+
end
|
308
|
+
# resource path
|
309
|
+
local_var_path = '/v2/crm/integration/list'
|
310
|
+
|
311
|
+
# query parameters
|
312
|
+
query_params = opts[:query_params] || {}
|
313
|
+
|
314
|
+
# header parameters
|
315
|
+
header_params = opts[:header_params] || {}
|
316
|
+
# HTTP header 'Accept' (if needed)
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
318
|
+
|
319
|
+
# form parameters
|
320
|
+
form_params = opts[:form_params] || {}
|
321
|
+
|
322
|
+
# http body (model)
|
323
|
+
post_body = opts[:body]
|
324
|
+
|
325
|
+
return_type = opts[:return_type] || 'ListGenericCrmIntegrationsResponse'
|
326
|
+
|
327
|
+
auth_names = opts[:auth_names] || []
|
328
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
329
|
+
:header_params => header_params,
|
330
|
+
:query_params => query_params,
|
331
|
+
:form_params => form_params,
|
332
|
+
:body => post_body,
|
333
|
+
:auth_names => auth_names,
|
334
|
+
:return_type => return_type)
|
335
|
+
|
336
|
+
if @api_client.config.debugging
|
337
|
+
@api_client.config.logger.debug "API called: CRMApi#list_generic_crm_integration_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
338
|
+
end
|
339
|
+
return data, status_code, headers
|
340
|
+
end
|
341
|
+
# Map Users (Deprecated)
|
342
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>This API is <b>Deprecated</b>. Please use \"/object/entities?objectType=BUSINESS_USER\" API instead.</p><p>Gong associates users with the CRM <b>User</b> entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.</p><p>This API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.</p><br><div class='public-api-important'><b>Important:</b><p>User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.<br><b>Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.</b></p><p>Each request to this API must include the complete list of users from the CRM system.</p></div><p>If a user mapping is sent after a deal is uploaded:</p><ol> <li>Gong retroactively searches for deals whose ownerId matches the user ID mapping.</li> <li>Gong starts to reprocess those matched deals from raw storage into Gong’s main database.</li></ol><p>Gong matches the user from the uploaded JSON to a user in Gong based on the email address.</p><div class='public-api-info'><p>The user mapping will not be created when:</p><ul> <li>There is no user in Gong with the supplied email address</li> <li>Mapping already exists for the supplied email address</li></ul></div><p>To update an existing mapping:</p><ol> <li>Delete the existing mapping by sending an existing mapping with isDeleted=true.</li> <li>In a separate request send a new mapping for the email address.</li></ol><p>The request body is a file in LDJSON format, meaning the file should contain JSON objects - where each JSON object is on a separate line and represents a single user from the CRM system.</p><p><b>Request Body Specifications:</b></p><ul> <li>Content-Type should be multipart/form-data</li> <li>Maximum payload size: 200 megabytes</li> <li>The request body should include one parameter named \"<b>dataFile</b>\" which contains the LDJSON file.</li></ul><h3>Request parameters (QUERY-STRING parameters)</h3><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>A unique identifier sent by you to enable troubleshooting communication.<br> Gong uses this identifier to prevent repeated attempts to upload the same users list.<br> Valid characters for this field: Letters, numbers, dashes, and underscores. </td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>integrationId</span></td> <td>Integration ID generated when creating the integration</td> <td>long</td> <td>Y</td> </tr> </tbody></table><p>User JSON object requires the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>crmUserId</span></td> <td>User ID in the CRM system</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>Must match an email address of a user in Gong. Not mandatory when isDeleted = true.</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isDeleted</span></td> <td>\"true\" deletes the user mapping. Default = \"false\"</td> <td>boolean</td> <td>N</td> </tr> </tbody></table><h3>Response</h3><code>201 Created</code><table> <thead> <tr> <th>Name</th> <th>Data Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>string</td> <td>the <span class='public-api-parameter'>clientRequestId</span> sent in the request</td> </tr> <tr> <td><span class='public-api-parameter'>requestId</span></td> <td>string</td> <td>A Gong request reference Id, generated for this request</td> </tr> </tbody></table><div class='public-api-important'><p><b>Important:</b> The users mapping API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the <span class='public-api-parameter'>clientRequestId</span> to troubleshoot failed requests and watch the request status using \"/request-status\" API.</p></div><h3>Error Codes</h3>400 - Malformed request<br>401 - Access denied<br>409 Conflict - clientRequestId already exists<br>429 - API request limit exceeded<br>500 - Internal Server Error<p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.</p><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/map/users?clientRequestId=1234&integrationId=6286478263646</code><br><br><code>{\"crmUserId\": \"2356ddfwe32\", \"emailAddress\": \"john.doe@acme.com\"}<br>{\"crmUserId\": \"67534ghf745\", \"isDeleted\": true} // remove user mapping for user 67534ghf745</code>
|
343
|
+
# @param [Hash] opts the optional parameters
|
344
|
+
# @option opts [String] :data_file
|
345
|
+
# @return [AsyncProcessingResponse]
|
346
|
+
def map_crm_users_using_post(opts = {})
|
347
|
+
data, _status_code, _headers = map_crm_users_using_post_with_http_info(opts)
|
348
|
+
data
|
349
|
+
end
|
350
|
+
|
351
|
+
# Map Users (Deprecated)
|
352
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>This API is <b>Deprecated</b>. Please use \"/object/entities?objectType=BUSINESS_USER\" API instead.</p><p>Gong associates users with the CRM <b>User</b> entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.</p><p>This API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.</p><br><div class='public-api-important'><b>Important:</b><p>User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.<br><b>Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.</b></p><p>Each request to this API must include the complete list of users from the CRM system.</p></div><p>If a user mapping is sent after a deal is uploaded:</p><ol> <li>Gong retroactively searches for deals whose ownerId matches the user ID mapping.</li> <li>Gong starts to reprocess those matched deals from raw storage into Gong’s main database.</li></ol><p>Gong matches the user from the uploaded JSON to a user in Gong based on the email address.</p><div class='public-api-info'><p>The user mapping will not be created when:</p><ul> <li>There is no user in Gong with the supplied email address</li> <li>Mapping already exists for the supplied email address</li></ul></div><p>To update an existing mapping:</p><ol> <li>Delete the existing mapping by sending an existing mapping with isDeleted=true.</li> <li>In a separate request send a new mapping for the email address.</li></ol><p>The request body is a file in LDJSON format, meaning the file should contain JSON objects - where each JSON object is on a separate line and represents a single user from the CRM system.</p><p><b>Request Body Specifications:</b></p><ul> <li>Content-Type should be multipart/form-data</li> <li>Maximum payload size: 200 megabytes</li> <li>The request body should include one parameter named \"<b>dataFile</b>\" which contains the LDJSON file.</li></ul><h3>Request parameters (QUERY-STRING parameters)</h3><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>A unique identifier sent by you to enable troubleshooting communication.<br> Gong uses this identifier to prevent repeated attempts to upload the same users list.<br> Valid characters for this field: Letters, numbers, dashes, and underscores. </td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>integrationId</span></td> <td>Integration ID generated when creating the integration</td> <td>long</td> <td>Y</td> </tr> </tbody></table><p>User JSON object requires the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>crmUserId</span></td> <td>User ID in the CRM system</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>Must match an email address of a user in Gong. Not mandatory when isDeleted = true.</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isDeleted</span></td> <td>\"true\" deletes the user mapping. Default = \"false\"</td> <td>boolean</td> <td>N</td> </tr> </tbody></table><h3>Response</h3><code>201 Created</code><table> <thead> <tr> <th>Name</th> <th>Data Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>string</td> <td>the <span class='public-api-parameter'>clientRequestId</span> sent in the request</td> </tr> <tr> <td><span class='public-api-parameter'>requestId</span></td> <td>string</td> <td>A Gong request reference Id, generated for this request</td> </tr> </tbody></table><div class='public-api-important'><p><b>Important:</b> The users mapping API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the <span class='public-api-parameter'>clientRequestId</span> to troubleshoot failed requests and watch the request status using \"/request-status\" API.</p></div><h3>Error Codes</h3>400 - Malformed request<br>401 - Access denied<br>409 Conflict - clientRequestId already exists<br>429 - API request limit exceeded<br>500 - Internal Server Error<p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.</p><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/map/users?clientRequestId=1234&integrationId=6286478263646</code><br><br><code>{\"crmUserId\": \"2356ddfwe32\", \"emailAddress\": \"john.doe@acme.com\"}<br>{\"crmUserId\": \"67534ghf745\", \"isDeleted\": true} // remove user mapping for user 67534ghf745</code>
|
353
|
+
# @param [Hash] opts the optional parameters
|
354
|
+
# @option opts [String] :data_file
|
355
|
+
# @return [Array<(AsyncProcessingResponse, Integer, Hash)>] AsyncProcessingResponse data, response status code and response headers
|
356
|
+
def map_crm_users_using_post_with_http_info(opts = {})
|
357
|
+
if @api_client.config.debugging
|
358
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.map_crm_users_using_post ...'
|
359
|
+
end
|
360
|
+
# resource path
|
361
|
+
local_var_path = '/v2/crm/map/users'
|
362
|
+
|
363
|
+
# query parameters
|
364
|
+
query_params = opts[:query_params] || {}
|
365
|
+
|
366
|
+
# header parameters
|
367
|
+
header_params = opts[:header_params] || {}
|
368
|
+
# HTTP header 'Accept' (if needed)
|
369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
370
|
+
# HTTP header 'Content-Type'
|
371
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
372
|
+
|
373
|
+
# form parameters
|
374
|
+
form_params = opts[:form_params] || {}
|
375
|
+
form_params['dataFile'] = opts[:'data_file'] if !opts[:'data_file'].nil?
|
376
|
+
|
377
|
+
# http body (model)
|
378
|
+
post_body = opts[:body]
|
379
|
+
|
380
|
+
return_type = opts[:return_type] || 'AsyncProcessingResponse'
|
381
|
+
|
382
|
+
auth_names = opts[:auth_names] || []
|
383
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
384
|
+
:header_params => header_params,
|
385
|
+
:query_params => query_params,
|
386
|
+
:form_params => form_params,
|
387
|
+
:body => post_body,
|
388
|
+
:auth_names => auth_names,
|
389
|
+
:return_type => return_type)
|
390
|
+
|
391
|
+
if @api_client.config.debugging
|
392
|
+
@api_client.config.logger.debug "API called: CRMApi#map_crm_users_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
393
|
+
end
|
394
|
+
return data, status_code, headers
|
395
|
+
end
|
396
|
+
# Register a Generic CRM integration (/v2/crm/integration/new)
|
397
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Register the CRM application in Gong and use the returned integrationId in future requests to the CRM API to correlate the data with the specific CRM.</p><p>Multiple CRM integrations are not currently supported. To create a new integration, first delete the old one.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:integration:register'.</p>
|
398
|
+
# @param body registrationRequest
|
399
|
+
# @param [Hash] opts the optional parameters
|
400
|
+
# @return [RegisterGenericCrmResponse]
|
401
|
+
def register_generic_crm_integration_using_put(body, opts = {})
|
402
|
+
data, _status_code, _headers = register_generic_crm_integration_using_put_with_http_info(body, opts)
|
403
|
+
data
|
404
|
+
end
|
405
|
+
|
406
|
+
# Register a Generic CRM integration (/v2/crm/integration/new)
|
407
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Register the CRM application in Gong and use the returned integrationId in future requests to the CRM API to correlate the data with the specific CRM.</p><p>Multiple CRM integrations are not currently supported. To create a new integration, first delete the old one.</p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:integration:register'.</p>
|
408
|
+
# @param body registrationRequest
|
409
|
+
# @param [Hash] opts the optional parameters
|
410
|
+
# @return [Array<(RegisterGenericCrmResponse, Integer, Hash)>] RegisterGenericCrmResponse data, response status code and response headers
|
411
|
+
def register_generic_crm_integration_using_put_with_http_info(body, opts = {})
|
412
|
+
if @api_client.config.debugging
|
413
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.register_generic_crm_integration_using_put ...'
|
414
|
+
end
|
415
|
+
# verify the required parameter 'body' is set
|
416
|
+
if @api_client.config.client_side_validation && body.nil?
|
417
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.register_generic_crm_integration_using_put"
|
418
|
+
end
|
419
|
+
# resource path
|
420
|
+
local_var_path = '/v2/crm/integration/new'
|
421
|
+
|
422
|
+
# query parameters
|
423
|
+
query_params = opts[:query_params] || {}
|
424
|
+
|
425
|
+
# header parameters
|
426
|
+
header_params = opts[:header_params] || {}
|
427
|
+
# HTTP header 'Accept' (if needed)
|
428
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
429
|
+
# HTTP header 'Content-Type'
|
430
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
431
|
+
|
432
|
+
# form parameters
|
433
|
+
form_params = opts[:form_params] || {}
|
434
|
+
|
435
|
+
# http body (model)
|
436
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
437
|
+
|
438
|
+
return_type = opts[:return_type] || 'RegisterGenericCrmResponse'
|
439
|
+
|
440
|
+
auth_names = opts[:auth_names] || []
|
441
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
442
|
+
:header_params => header_params,
|
443
|
+
:query_params => query_params,
|
444
|
+
:form_params => form_params,
|
445
|
+
:body => post_body,
|
446
|
+
:auth_names => auth_names,
|
447
|
+
:return_type => return_type)
|
448
|
+
|
449
|
+
if @api_client.config.debugging
|
450
|
+
@api_client.config.logger.debug "API called: CRMApi#register_generic_crm_integration_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
451
|
+
end
|
452
|
+
return data, status_code, headers
|
453
|
+
end
|
454
|
+
# Upload CRM objects (/v2/crm/object/entities)
|
455
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Inserts, updates, or deletes a CRM object in Gong.<br>If an existing object with the same id is detected it will be updated, otherwise it will be inserted as a new object.</p><p>The request body is a file in LDJSON format, meaning the file should contain JSON objects, where each JSON object is in a separate line and represents a single CRM object.</p><p>All objects in a single request should be of the same object type. An object cannot be contained more than once in a given list.</p><p><b>Request Body Specifications:</b></p><ul> <li>Content-Type should be multipart/form-data</li> <li>Maximum payload size: 200 megabytes</li> <li>The request body should contain one parameter named \"<b>dataFile</b>\" which holds the LDJSON file</li></ul><div class='public-api-important'><p><b>Important:</b> The list must be sorted by modifiedDate Ascending.</p></div><div class='public-api-info'><p><ul> <li>On initial upload: Only send the items that weren’t deleted</li> <li>On subsequent (incremental) uploads: Send all items.</li></ul></p></div><div class='public-api-info'><p>Dates in the uploaded JSON objects are represented in ISO-8601 format without milliseconds (e.g. '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).</p></div><h3>Request parameters (QUERY-STRING parameters)</h3><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>integrationId</span></td> <td>Integration ID generated when creating the integration</td> <td>long</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>objectType</span></td> <td>Must be one of: \"ACCOUNT\", \"CONTACT\", \"DEAL\", \"LEAD\", \"BUSINESS_USER\", or \"STAGE\" (case-sensitive)</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>A unique identifier sent by you to allow troubleshooting communication.<br> Gong also uses this identifier to prevent repeated attempts to upload the same object list.<br> Valid characters for this field are letters, numbers, dashes and underscores. </td> <td>string</td> <td>Y</td> </tr> </tbody></table><h3>Response</h3><code>201 Created</code><table> <thead> <tr> <th>Name</th> <th>Data Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>string</td> <td>the <span class='public-api-parameter'>clientRequestId</span> sent in the request</td> </tr> <tr> <td><span class='public-api-parameter'>requestId</span></td> <td>string</td> <td>A Gong request reference Id, generated for this request</td> </tr> </tbody></table><div class='public-api-important'><p><b>Important:</b> The upload objects API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the <span class='public-api-parameter'>clientRequestId</span> to troubleshoot failed requests and watch the request status using \"/request-status\" API.</p></div><h3>Error Codes</h3>400 - Malformed request<br>401 - Access denied<br>409 Conflict - clientRequestId already exists<br>429 - API request limit exceeded<br>500 - Internal Server Error<p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.</p><h2>Common CRM object fields</h2><p>All uploaded CRM objects should contain the following common JSON fields. In addition, each uploaded object should contain mandatory and optional fields as specified below for each object type.</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>objectId</span></td> <td>Each object must have a unique id field provided by the CRM.</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>modifiedDate</span></td> <td>The object’s last modification date and time in the CRM in ISO-8601 datetime format, without milliseconds</td> <td>datetime</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>lastModified</span><b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>modifiedDate</span></td> <td>datetime</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>isDeleted</span></td> <td>\"true\" deletes the object (For objectType=BUSINESS_USER deletes also the user mapping. For objectType=STAGE sets the stage to inactive). Default = \"false\"</td> <td>boolean</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>url</span></td> <td>A full http URL to browse this object in the CRM</td> <td>string (Qualified URI)</td> <td>N</td> </tr> </tbody></table><h2>Business User Object</h2><p>Gong associates users with the CRM <b>User</b> entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.</p><p>Uploading user objects via this API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.</p><br><div class='public-api-important'> <b>Important:</b> <p>User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.<br> <b>Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.</b> </p> <p>On initial upload send the complete list of users from the CRM system. On incremental upload send only users that have changed.</p></div><p>If a user is uploaded after a deal is uploaded:</p><ol> <li>Gong retroactively searches for deals whose ownerId matches the user ID mapping.</li> <li>Gong starts to reprocess those matched deals from raw storage into Gong’s main database.</li></ol><p>Gong matches the user from the uploaded JSON to a user in Gong based on the email address.</p><div class='public-api-info'> <p>The user mapping will not be created when:</p> <ul> <li>There is no user in Gong with the supplied email address</li> <li>Mapping already exists for the supplied email address</li> </ul></div><p>To update an existing mapping:</p><ol> <li>Delete the existing mapping by sending the user with isDeleted=true.</li> <li>In a separate request send the user with isDeleted=false and a new email address, or send a different user for the same email address.</li></ol><p>Business User JSON object requires the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>Must match an email address of a user in Gong. Not mandatory when isDeleted = true.</td> <td>string</td> <td>Y</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=BUSINESS_USER</code><br><br><code> {\"objectId\": \"user1_Id_In_The_CRM\", \"emailAddress\": \"john.doe@acme.com\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"}<br> {\"objectId\": \"user2_Id_In_The_CRM\", \"isDeleted\": true, \"emailAddress\": \"john.taylor@acme.com\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"} // remove user mapping for user user2_Id_In_The_CRM</code><h2>Stage Object</h2><p>Update the list of stages from the CRM system.</p><p>Stages must be uploaded via this API before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.</p><div class='public-api-info'> <p>The upload stages request should only be sent after:</p> <ul> <li>You have created a new integration.</li> <li>There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the '/object/entities' API.</li> </ul></div><p>Stage JSON object requires the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>internalName</span></td> <td>Unique name or unique identifier that identifies the stage in the CRM.</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>name</span></td> <td>Stage name (for display in Gong UI).</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isActive</span></td> <td>Indicates if the stage is active in the CRM.</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>sortOrder</span></td> <td>The order of the stage in the sales process (starting from 1).</td> <td>integer</td> <td>Y</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=STAGE</code><br><br><code> {\"objectId\": \"discovery\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"internalName\": \"discovery\", \"name\": \"Discovery\", \"isActive\": true, \"sortOrder\": 1}<br> {\"objectId\": \"won\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"internalName\": \"won\", \"name\": \"Closed Won\", \"isActive\": true, \"sortOrder\": 5}</code><h2>Account Object</h2><ul> <li>The Account object represents an active customer in the CRM system.</li> <li>The Account object is used by Gong to connect activities such as emails and calls to their associated account.</li></ul><p>The Deals page displays all the activities in Gong associated with an account as well as account status, contacts, and insights.</p><div class='public-api-info'><p>Contacts and Deals are associated with accounts, and their processing in Gong requires the associated account.</p><p>In order for Deals to be processed correctly by Gong:<ol> <li>Upload Accounts.</li> <li>Wait 60 seconds.</li> <li>Upload Contacts and Deals.</li></ol></p></div><div class='public-api-critical'><p>When deals are being processed, the account referenced by Deal.accountId must exist in the Gong database.<br>If it does not exist in the database, the deal will not be processed or displayed in the Deals page and other areas throughout Gong.</p></div><p>The Account JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>name</span></td> <td>Account name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>domains</span></td> <td>Domain names related to the account</td> <td>string array</td> <td>Y</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=ACCOUNT</code><br><br><code>{\"objectId\": \"5ybyh6n6n65\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/accounts/5ybyh6n6n65\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"type\": \"Investor\"} // account with additional field<br>{\"objectId\": \"gfjhty756th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"isDeleted\": true} // remove account gfjhty756th from Gong</code><h2>Contact Object</h2><ul> <li>A contact in Gong is a person with contact details associated with the account.</li> <li>Gong uses a contact to match an activity to the correct account.</li></ul><p>The Contact JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>accountId</span></td> <td>The ID of the contact’s connected account in the CRM</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>The contact’s main email address</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>firstName</span></td> <td>The contact’s first name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>lastName</span></td> <td>The contact’s last name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>title</span></td> <td>The contact’s title (if available)</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>phoneNumber</span></td> <td>The contact’s main phone number.<br> If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. </td> <td>string</td> <td>Y for dialer calls,<br> N otherwise </td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=CONTACT</code><br><br><code>{\"objectId\": \"5zbwd7n5n65\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/contacts/5zbwd7n5n65\", \"accountId\": \"5ybyh6n6n65\", \"emailAddress\": \"john.smith@acme.com\", \"firstName\": \"john\", \"lastName\": \"smith\", \"phoneNumber\": \"(912) 507-4395\"}</code><h2>Lead Object</h2><ul> <li>The Lead object represents a potential customer.</li> <li>Calls and emails are first associated with contacts based on email addresses.</li> <li>If there is no matching contact, Gong tries to match calls and emails to a lead.</li></ul><p>The Lead JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>The Lead’s main email address</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>firstName</span></td> <td>The Lead’s first name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>lastName</span></td> <td>The Lead’s last name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>title</span></td> <td>The Lead’s title (if available)</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>phoneNumber</span></td> <td>The Lead’s phone number.<br> If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. </td> <td>string</td> <td>Y for dialer calls,<br> N otherwise </td> </tr> <tr> <td><span class='public-api-parameter'>convertedToDealId</span></td> <td>The deal CRM ID, if the lead was converted to a Deal</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>convertedToContactId</span></td> <td>The contact CRM ID if the lead was converted to a Contact</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>convertedToAccountId</span></td> <td>The account CRM ID if the lead was converted to an Account</td> <td>string</td> <td>N</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=LEAD</code><br><br><code>{\"objectId\": \"4v5bt54t553\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/leads/45k4j5j5k44\", \"emailAddress\": \"jane.doe@acme.com\", \"firstName\": \"Jane\", \"lastName\": \"Doe\", \"title\": \"VP Special Effects\", \"phoneNumber\": \"(912) 507-4395\"}<br>{\"objectId\": \"gf4543gf6th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"emailAddress\": \"john.smith@acme.com\", \"firstName\": \"John\", \"lastName\": \"Smith\", \"isDeleted\": true} // remove lead gf4543gf6th<br>{\"objectId\": \"63473hjg53h\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"emailAddress\": \"bob.smith@acme.com\", \"firstName\": \"Bob\", \"lastName\": \"Smith\", \"convertedToDealId\": \"dkfj8dfgf87\", \"convertedToContactId\": \"87grhn74hg6\", \"convertedToAccountId\": \"6sjk47jf78d\"} // lead 63473hjg53h converted to account 6sjk47jf78d, contact 87grhn74hg6 and deal dkfj8dfgf87</code><h2>Deal Object</h2><p>A deal in Gong represents a qualified opportunity or contract in a specific account.</p><p>The Deal JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>accountId</span></td> <td> <p>The ID of the account the deal is associated with in the CRM</p> <div class='public-api-info'> <p>An account with the same objectId must be uploaded first in order for the deal to be processed. The accountId needs to match an Account with the same value in its objectId.</p> </div> </td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>ownerId</span></td> <td> <p>The ID of the owning User in the CRM</p> <div class='public-api-info'> <p>This field is a reference to a CRM user which must be mapped to a Gong user via \"/map/users\" API and the Gong user must be set to record or import calls, otherwise the deal will not be processed</p> </div> </td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>name</span></td> <td>The deal’s name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>createdDate</span></td> <td>The deal’s creation date and time (ISO-8601 datetime without milliseconds)</td> <td>datetime</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>estimatedCloseDate</span>*<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>closeDate</span> instead</td> <td>date</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>actualCloseDate</span>*<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>closeDate</span> instead</td> <td>date</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>closeDate</span></td> <td>The deal’s close date (ISO-8601), without time e.g. \"2021-05-19\"</td> <td>date</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isOpen</span></td> <td>Indicates if the Deal’s status is Open or Closed</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isWon</span></td> <td>Indicates if the Deal’s status is Won or Lost</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>stage</span></td> <td>The value of this field must be equal to the internalName of one of the stages uploaded via \"/stages\" API</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>estimatedAmount</span>**<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>amount</span> instead</td> <td>currency</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>actualAmount</span>**<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>amount</span> instead</td> <td>currency</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>amount</span></td> <td>The deal’s amount in the currency unit</td> <td>currency</td> <td>Y</td> </tr> </tbody></table><p>* Either <span class='public-api-parameter'>estimatedCloseDate</span> or <span class='public-api-parameter'>actualCloseDate</span> (or both) must exist in the JSON<br>** Either <span class='public-api-parameter'>estimatedAmount</span> or <span class='public-api-parameter'>actualAmount</span> (or both) must exist in the JSON</p><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=DEAL</code><br><br><code>{\"objectId\": \"8608553\", \"modifiedDate\": \"2022-02-04T18:24:59Z\", \"url\": \"http://crm.com/deals/8608553\", \"accountId\": \"5ybyh6n6n65\", \"ownerId\": \"5486951\", \"name\": \"Deal name\", \"createdDate\": \"2022-02-04T17:57:23Z\", \"closeDate\": \"2022-09-04\", \"isOpen\": true, \"isWon\": false, \"stage\": \"discovery\", \"amount\": 7000, \"custom_field_1\": \"2022-02-04T17:57:23.000Z\", \"custom_field_2\": null}</code><h2>Additional Fields</h2><p>In addition to the fields required by Gong, you can also add any other field to each object if the following two conditions are met:<ul> <li>The field name is defined in the object's schema and has been uploaded using \"/object/schema\" API</li> <li>The field value matches the type defined in the schema</li></ul></p>
|
456
|
+
# @param [Hash] opts the optional parameters
|
457
|
+
# @option opts [String] :data_file
|
458
|
+
# @return [AsyncProcessingResponse]
|
459
|
+
def upload_crm_data_using_post(opts = {})
|
460
|
+
data, _status_code, _headers = upload_crm_data_using_post_with_http_info(opts)
|
461
|
+
data
|
462
|
+
end
|
463
|
+
|
464
|
+
# Upload CRM objects (/v2/crm/object/entities)
|
465
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>Inserts, updates, or deletes a CRM object in Gong.<br>If an existing object with the same id is detected it will be updated, otherwise it will be inserted as a new object.</p><p>The request body is a file in LDJSON format, meaning the file should contain JSON objects, where each JSON object is in a separate line and represents a single CRM object.</p><p>All objects in a single request should be of the same object type. An object cannot be contained more than once in a given list.</p><p><b>Request Body Specifications:</b></p><ul> <li>Content-Type should be multipart/form-data</li> <li>Maximum payload size: 200 megabytes</li> <li>The request body should contain one parameter named \"<b>dataFile</b>\" which holds the LDJSON file</li></ul><div class='public-api-important'><p><b>Important:</b> The list must be sorted by modifiedDate Ascending.</p></div><div class='public-api-info'><p><ul> <li>On initial upload: Only send the items that weren’t deleted</li> <li>On subsequent (incremental) uploads: Send all items.</li></ul></p></div><div class='public-api-info'><p>Dates in the uploaded JSON objects are represented in ISO-8601 format without milliseconds (e.g. '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).</p></div><h3>Request parameters (QUERY-STRING parameters)</h3><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>integrationId</span></td> <td>Integration ID generated when creating the integration</td> <td>long</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>objectType</span></td> <td>Must be one of: \"ACCOUNT\", \"CONTACT\", \"DEAL\", \"LEAD\", \"BUSINESS_USER\", or \"STAGE\" (case-sensitive)</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>A unique identifier sent by you to allow troubleshooting communication.<br> Gong also uses this identifier to prevent repeated attempts to upload the same object list.<br> Valid characters for this field are letters, numbers, dashes and underscores. </td> <td>string</td> <td>Y</td> </tr> </tbody></table><h3>Response</h3><code>201 Created</code><table> <thead> <tr> <th>Name</th> <th>Data Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>clientRequestId</span></td> <td>string</td> <td>the <span class='public-api-parameter'>clientRequestId</span> sent in the request</td> </tr> <tr> <td><span class='public-api-parameter'>requestId</span></td> <td>string</td> <td>A Gong request reference Id, generated for this request</td> </tr> </tbody></table><div class='public-api-important'><p><b>Important:</b> The upload objects API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the <span class='public-api-parameter'>clientRequestId</span> to troubleshoot failed requests and watch the request status using \"/request-status\" API.</p></div><h3>Error Codes</h3>400 - Malformed request<br>401 - Access denied<br>409 Conflict - clientRequestId already exists<br>429 - API request limit exceeded<br>500 - Internal Server Error<p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.</p><h2>Common CRM object fields</h2><p>All uploaded CRM objects should contain the following common JSON fields. In addition, each uploaded object should contain mandatory and optional fields as specified below for each object type.</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>objectId</span></td> <td>Each object must have a unique id field provided by the CRM.</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>modifiedDate</span></td> <td>The object’s last modification date and time in the CRM in ISO-8601 datetime format, without milliseconds</td> <td>datetime</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>lastModified</span><b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>modifiedDate</span></td> <td>datetime</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>isDeleted</span></td> <td>\"true\" deletes the object (For objectType=BUSINESS_USER deletes also the user mapping. For objectType=STAGE sets the stage to inactive). Default = \"false\"</td> <td>boolean</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>url</span></td> <td>A full http URL to browse this object in the CRM</td> <td>string (Qualified URI)</td> <td>N</td> </tr> </tbody></table><h2>Business User Object</h2><p>Gong associates users with the CRM <b>User</b> entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.</p><p>Uploading user objects via this API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.</p><br><div class='public-api-important'> <b>Important:</b> <p>User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.<br> <b>Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.</b> </p> <p>On initial upload send the complete list of users from the CRM system. On incremental upload send only users that have changed.</p></div><p>If a user is uploaded after a deal is uploaded:</p><ol> <li>Gong retroactively searches for deals whose ownerId matches the user ID mapping.</li> <li>Gong starts to reprocess those matched deals from raw storage into Gong’s main database.</li></ol><p>Gong matches the user from the uploaded JSON to a user in Gong based on the email address.</p><div class='public-api-info'> <p>The user mapping will not be created when:</p> <ul> <li>There is no user in Gong with the supplied email address</li> <li>Mapping already exists for the supplied email address</li> </ul></div><p>To update an existing mapping:</p><ol> <li>Delete the existing mapping by sending the user with isDeleted=true.</li> <li>In a separate request send the user with isDeleted=false and a new email address, or send a different user for the same email address.</li></ol><p>Business User JSON object requires the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>Must match an email address of a user in Gong. Not mandatory when isDeleted = true.</td> <td>string</td> <td>Y</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=BUSINESS_USER</code><br><br><code> {\"objectId\": \"user1_Id_In_The_CRM\", \"emailAddress\": \"john.doe@acme.com\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"}<br> {\"objectId\": \"user2_Id_In_The_CRM\", \"isDeleted\": true, \"emailAddress\": \"john.taylor@acme.com\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"} // remove user mapping for user user2_Id_In_The_CRM</code><h2>Stage Object</h2><p>Update the list of stages from the CRM system.</p><p>Stages must be uploaded via this API before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.</p><div class='public-api-info'> <p>The upload stages request should only be sent after:</p> <ul> <li>You have created a new integration.</li> <li>There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the '/object/entities' API.</li> </ul></div><p>Stage JSON object requires the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>internalName</span></td> <td>Unique name or unique identifier that identifies the stage in the CRM.</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>name</span></td> <td>Stage name (for display in Gong UI).</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isActive</span></td> <td>Indicates if the stage is active in the CRM.</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>sortOrder</span></td> <td>The order of the stage in the sales process (starting from 1).</td> <td>integer</td> <td>Y</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=STAGE</code><br><br><code> {\"objectId\": \"discovery\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"internalName\": \"discovery\", \"name\": \"Discovery\", \"isActive\": true, \"sortOrder\": 1}<br> {\"objectId\": \"won\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"internalName\": \"won\", \"name\": \"Closed Won\", \"isActive\": true, \"sortOrder\": 5}</code><h2>Account Object</h2><ul> <li>The Account object represents an active customer in the CRM system.</li> <li>The Account object is used by Gong to connect activities such as emails and calls to their associated account.</li></ul><p>The Deals page displays all the activities in Gong associated with an account as well as account status, contacts, and insights.</p><div class='public-api-info'><p>Contacts and Deals are associated with accounts, and their processing in Gong requires the associated account.</p><p>In order for Deals to be processed correctly by Gong:<ol> <li>Upload Accounts.</li> <li>Wait 60 seconds.</li> <li>Upload Contacts and Deals.</li></ol></p></div><div class='public-api-critical'><p>When deals are being processed, the account referenced by Deal.accountId must exist in the Gong database.<br>If it does not exist in the database, the deal will not be processed or displayed in the Deals page and other areas throughout Gong.</p></div><p>The Account JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>name</span></td> <td>Account name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>domains</span></td> <td>Domain names related to the account</td> <td>string array</td> <td>Y</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=ACCOUNT</code><br><br><code>{\"objectId\": \"5ybyh6n6n65\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/accounts/5ybyh6n6n65\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"type\": \"Investor\"} // account with additional field<br>{\"objectId\": \"gfjhty756th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"isDeleted\": true} // remove account gfjhty756th from Gong</code><h2>Contact Object</h2><ul> <li>A contact in Gong is a person with contact details associated with the account.</li> <li>Gong uses a contact to match an activity to the correct account.</li></ul><p>The Contact JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>accountId</span></td> <td>The ID of the contact’s connected account in the CRM</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>The contact’s main email address</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>firstName</span></td> <td>The contact’s first name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>lastName</span></td> <td>The contact’s last name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>title</span></td> <td>The contact’s title (if available)</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>phoneNumber</span></td> <td>The contact’s main phone number.<br> If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. </td> <td>string</td> <td>Y for dialer calls,<br> N otherwise </td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=CONTACT</code><br><br><code>{\"objectId\": \"5zbwd7n5n65\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/contacts/5zbwd7n5n65\", \"accountId\": \"5ybyh6n6n65\", \"emailAddress\": \"john.smith@acme.com\", \"firstName\": \"john\", \"lastName\": \"smith\", \"phoneNumber\": \"(912) 507-4395\"}</code><h2>Lead Object</h2><ul> <li>The Lead object represents a potential customer.</li> <li>Calls and emails are first associated with contacts based on email addresses.</li> <li>If there is no matching contact, Gong tries to match calls and emails to a lead.</li></ul><p>The Lead JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>emailAddress</span></td> <td>The Lead’s main email address</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>firstName</span></td> <td>The Lead’s first name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>lastName</span></td> <td>The Lead’s last name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>title</span></td> <td>The Lead’s title (if available)</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>phoneNumber</span></td> <td>The Lead’s phone number.<br> If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. </td> <td>string</td> <td>Y for dialer calls,<br> N otherwise </td> </tr> <tr> <td><span class='public-api-parameter'>convertedToDealId</span></td> <td>The deal CRM ID, if the lead was converted to a Deal</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>convertedToContactId</span></td> <td>The contact CRM ID if the lead was converted to a Contact</td> <td>string</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>convertedToAccountId</span></td> <td>The account CRM ID if the lead was converted to an Account</td> <td>string</td> <td>N</td> </tr> </tbody></table><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=LEAD</code><br><br><code>{\"objectId\": \"4v5bt54t553\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/leads/45k4j5j5k44\", \"emailAddress\": \"jane.doe@acme.com\", \"firstName\": \"Jane\", \"lastName\": \"Doe\", \"title\": \"VP Special Effects\", \"phoneNumber\": \"(912) 507-4395\"}<br>{\"objectId\": \"gf4543gf6th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"emailAddress\": \"john.smith@acme.com\", \"firstName\": \"John\", \"lastName\": \"Smith\", \"isDeleted\": true} // remove lead gf4543gf6th<br>{\"objectId\": \"63473hjg53h\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"emailAddress\": \"bob.smith@acme.com\", \"firstName\": \"Bob\", \"lastName\": \"Smith\", \"convertedToDealId\": \"dkfj8dfgf87\", \"convertedToContactId\": \"87grhn74hg6\", \"convertedToAccountId\": \"6sjk47jf78d\"} // lead 63473hjg53h converted to account 6sjk47jf78d, contact 87grhn74hg6 and deal dkfj8dfgf87</code><h2>Deal Object</h2><p>A deal in Gong represents a qualified opportunity or contract in a specific account.</p><p>The Deal JSON object includes the following fields:</p><table> <thead> <tr> <th>Name</th> <th>Description</th> <th>Data Type</th> <th>Mandatory</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>accountId</span></td> <td> <p>The ID of the account the deal is associated with in the CRM</p> <div class='public-api-info'> <p>An account with the same objectId must be uploaded first in order for the deal to be processed. The accountId needs to match an Account with the same value in its objectId.</p> </div> </td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>ownerId</span></td> <td> <p>The ID of the owning User in the CRM</p> <div class='public-api-info'> <p>This field is a reference to a CRM user which must be mapped to a Gong user via \"/map/users\" API and the Gong user must be set to record or import calls, otherwise the deal will not be processed</p> </div> </td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>name</span></td> <td>The deal’s name</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>createdDate</span></td> <td>The deal’s creation date and time (ISO-8601 datetime without milliseconds)</td> <td>datetime</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>estimatedCloseDate</span>*<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>closeDate</span> instead</td> <td>date</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>actualCloseDate</span>*<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>closeDate</span> instead</td> <td>date</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>closeDate</span></td> <td>The deal’s close date (ISO-8601), without time e.g. \"2021-05-19\"</td> <td>date</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isOpen</span></td> <td>Indicates if the Deal’s status is Open or Closed</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>isWon</span></td> <td>Indicates if the Deal’s status is Won or Lost</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>stage</span></td> <td>The value of this field must be equal to the internalName of one of the stages uploaded via \"/stages\" API</td> <td>string</td> <td>Y</td> </tr> <tr> <td><span class='public-api-parameter'>estimatedAmount</span>**<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>amount</span> instead</td> <td>currency</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>actualAmount</span>**<b>(Deprecated)</b></td> <td><b>Deprecated</b>. Please use <span class='public-api-parameter'>amount</span> instead</td> <td>currency</td> <td>N</td> </tr> <tr> <td><span class='public-api-parameter'>amount</span></td> <td>The deal’s amount in the currency unit</td> <td>currency</td> <td>Y</td> </tr> </tbody></table><p>* Either <span class='public-api-parameter'>estimatedCloseDate</span> or <span class='public-api-parameter'>actualCloseDate</span> (or both) must exist in the JSON<br>** Either <span class='public-api-parameter'>estimatedAmount</span> or <span class='public-api-parameter'>actualAmount</span> (or both) must exist in the JSON</p><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=DEAL</code><br><br><code>{\"objectId\": \"8608553\", \"modifiedDate\": \"2022-02-04T18:24:59Z\", \"url\": \"http://crm.com/deals/8608553\", \"accountId\": \"5ybyh6n6n65\", \"ownerId\": \"5486951\", \"name\": \"Deal name\", \"createdDate\": \"2022-02-04T17:57:23Z\", \"closeDate\": \"2022-09-04\", \"isOpen\": true, \"isWon\": false, \"stage\": \"discovery\", \"amount\": 7000, \"custom_field_1\": \"2022-02-04T17:57:23.000Z\", \"custom_field_2\": null}</code><h2>Additional Fields</h2><p>In addition to the fields required by Gong, you can also add any other field to each object if the following two conditions are met:<ul> <li>The field name is defined in the object's schema and has been uploaded using \"/object/schema\" API</li> <li>The field value matches the type defined in the schema</li></ul></p>
|
466
|
+
# @param [Hash] opts the optional parameters
|
467
|
+
# @option opts [String] :data_file
|
468
|
+
# @return [Array<(AsyncProcessingResponse, Integer, Hash)>] AsyncProcessingResponse data, response status code and response headers
|
469
|
+
def upload_crm_data_using_post_with_http_info(opts = {})
|
470
|
+
if @api_client.config.debugging
|
471
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.upload_crm_data_using_post ...'
|
472
|
+
end
|
473
|
+
# resource path
|
474
|
+
local_var_path = '/v2/crm/object/entities'
|
475
|
+
|
476
|
+
# query parameters
|
477
|
+
query_params = opts[:query_params] || {}
|
478
|
+
|
479
|
+
# header parameters
|
480
|
+
header_params = opts[:header_params] || {}
|
481
|
+
# HTTP header 'Accept' (if needed)
|
482
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
483
|
+
# HTTP header 'Content-Type'
|
484
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
485
|
+
|
486
|
+
# form parameters
|
487
|
+
form_params = opts[:form_params] || {}
|
488
|
+
form_params['dataFile'] = opts[:'data_file'] if !opts[:'data_file'].nil?
|
489
|
+
|
490
|
+
# http body (model)
|
491
|
+
post_body = opts[:body]
|
492
|
+
|
493
|
+
return_type = opts[:return_type] || 'AsyncProcessingResponse'
|
494
|
+
|
495
|
+
auth_names = opts[:auth_names] || []
|
496
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
497
|
+
:header_params => header_params,
|
498
|
+
:query_params => query_params,
|
499
|
+
:form_params => form_params,
|
500
|
+
:body => post_body,
|
501
|
+
:auth_names => auth_names,
|
502
|
+
:return_type => return_type)
|
503
|
+
|
504
|
+
if @api_client.config.debugging
|
505
|
+
@api_client.config.logger.debug "API called: CRMApi#upload_crm_data_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
506
|
+
end
|
507
|
+
return data, status_code, headers
|
508
|
+
end
|
509
|
+
# Upload Object Schema (/v2/crm/object/schema)
|
510
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>All CRM object fields in Gong must have a representative schema that describes the field (unique name, type, etc.). <br>Any field uploaded by the \"Upload CRM objects\" API (\"/object/entities\" path) that is not described in the schema will be stored in Gong’s raw data storage. However, it will not be parsed by Gong and it will not be available to the end user.</p><p>For new integrations created via \"/integration/new\" API, Gong creates a default schema for each object type (Contact, Account, Deal, Lead) that contains the mandatory and optional fields specified in this guide. See the <b>Upload CRM objects</b> API section for more information.<br>If there are additional fields for any object type that are needed by the end user, send their schema via this API.</p><p><div class='public-api-info'>The schema update request should be sent when:<ul> <li>You have created a new integration.</li> <li>There are changes to the schema of any object type. You can also send a schema update request before any request to the '/object/entities' API.</li></ul></div></p><p><div class='public-api-important'>Each schema update request must contain the full schema from your CRM. Fields that were sent in previous requests and no longer exist in your CRM, should be sent in the schema request with \"isDeleted=true\" (only once).</div></p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.</p><h3>Supported Field Types</h3><table> <thead> <tr> <th>Field Type</th> <th>Format in JSON</th> <th>Sample Values</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>BOOLEAN</span></td> <td>boolean</td> <td>true, false</td> </tr> <tr> <td><span class='public-api-parameter'>DATE</span></td> <td>string (ISO-8601 date without time)</td> <td>\"2020-05-31\"</td> </tr> <tr> <td><span class='public-api-parameter'>DATETIME</span></td> <td>string (ISO-8601 datetime without milliseconds)</td> <td>\"2020-12-17T07:37:21+02:00\"<br>\"2020-12-17T05:37:21Z\"</td> </tr> <tr> <td><span class='public-api-parameter'>PICKLIST</span></td> <td>string - one of the values in an orderedValueList</td> <td>\"Analyst\"</td> </tr> <tr> <td><span class='public-api-parameter'>NUMBER</span></td> <td>number</td> <td>45.66, 8453</td> </tr> <tr> <td><span class='public-api-parameter'>PERCENT</span></td> <td>number (between 0 to 100)</td> <td>67.3</td> </tr> <tr> <td><span class='public-api-parameter'>CURRENCY</span>*</td> <td>number</td> <td>34.68</td> </tr> <tr> <td><span class='public-api-parameter'>PHONENUMBER</span></td> <td>string</td> <td>\"+14055766687\"</td> </tr> <tr> <td><span class='public-api-parameter'>EMAILADDRESS</span></td> <td>string</td> <td>\"john.doe@anywhere.com\"</td> </tr> <tr> <td><span class='public-api-parameter'>REFERENCE</span></td> <td>string - the id of another object</td> <td>\"48b009drax\"</td> </tr> <tr> <td><span class='public-api-parameter'>ID</span></td> <td>string - the id of the object</td> <td>\"843hf8484jr84htg\"</td> </tr> <tr> <td><span class='public-api-parameter'>STRING</span></td> <td>string</td> <td>\"whatever you want\"</td> </tr> <tr> <td><span class='public-api-parameter'>STRINGARRAY</span>**</td> <td>array of strings</td> <td>[\"http://customer.com\"]</td> </tr> <tr> <td><span class='public-api-parameter'>URL</span></td> <td>string</td> <td>\"https://crm.com/account/6d4r578f\"</td> </tr> </tbody></table><p>* In the integration send a number value, and specify the correct currency symbol in the Gong UI. Currently Gong does not support multiple currencies per company.<br>** Can only be used for Gong-defined fields.</p><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/schema?integrationId=6286478263646&objectType=ACCOUNT</code><br><br><code>[{\"uniqueName\": \"orderId\", \"label\": \"ID\", \"type\": \"ID\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},<br>{\"uniqueName\": \"parentAccount\", \"label\": \"Main Account\", \"type\": \"REFERENCE\", \"referenceTo\": \"ACCOUNT\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},<br>{\"uniqueName\": \"category\", \"label\": \"Category\", \"type\": \"PICKLIST\", \"orderedValueList\": [\"Analyst\", \"Competitor\", \"Customer\", \"Integrator\", \"Investor\", \"Partner\", \"Other\"], \"lastModified\": \"2020-11-11T08:11:34+01:00\"}, // custom field<br>{\"uniqueName\": \"industry\", \"isDeleted\": true, \"lastModified\": \"2020-11-21T08:11:34+01:00\"}] // remove custom field</code>
|
511
|
+
# @param body fields
|
512
|
+
# @param integration_id Integration ID generated when creating the integration
|
513
|
+
# @param object_type Type of object to set the schema for (case-sensitive)
|
514
|
+
# @param [Hash] opts the optional parameters
|
515
|
+
# @return [SchemaUpdateResponse]
|
516
|
+
def upload_crm_schema_field_using_post(body, integration_id, object_type, opts = {})
|
517
|
+
data, _status_code, _headers = upload_crm_schema_field_using_post_with_http_info(body, integration_id, object_type, opts)
|
518
|
+
data
|
519
|
+
end
|
520
|
+
|
521
|
+
# Upload Object Schema (/v2/crm/object/schema)
|
522
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>All CRM object fields in Gong must have a representative schema that describes the field (unique name, type, etc.). <br>Any field uploaded by the \"Upload CRM objects\" API (\"/object/entities\" path) that is not described in the schema will be stored in Gong’s raw data storage. However, it will not be parsed by Gong and it will not be available to the end user.</p><p>For new integrations created via \"/integration/new\" API, Gong creates a default schema for each object type (Contact, Account, Deal, Lead) that contains the mandatory and optional fields specified in this guide. See the <b>Upload CRM objects</b> API section for more information.<br>If there are additional fields for any object type that are needed by the end user, send their schema via this API.</p><p><div class='public-api-info'>The schema update request should be sent when:<ul> <li>You have created a new integration.</li> <li>There are changes to the schema of any object type. You can also send a schema update request before any request to the '/object/entities' API.</li></ul></div></p><p><div class='public-api-important'>Each schema update request must contain the full schema from your CRM. Fields that were sent in previous requests and no longer exist in your CRM, should be sent in the schema request with \"isDeleted=true\" (only once).</div></p><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.</p><h3>Supported Field Types</h3><table> <thead> <tr> <th>Field Type</th> <th>Format in JSON</th> <th>Sample Values</th> </tr> </thead> <tbody> <tr> <td><span class='public-api-parameter'>BOOLEAN</span></td> <td>boolean</td> <td>true, false</td> </tr> <tr> <td><span class='public-api-parameter'>DATE</span></td> <td>string (ISO-8601 date without time)</td> <td>\"2020-05-31\"</td> </tr> <tr> <td><span class='public-api-parameter'>DATETIME</span></td> <td>string (ISO-8601 datetime without milliseconds)</td> <td>\"2020-12-17T07:37:21+02:00\"<br>\"2020-12-17T05:37:21Z\"</td> </tr> <tr> <td><span class='public-api-parameter'>PICKLIST</span></td> <td>string - one of the values in an orderedValueList</td> <td>\"Analyst\"</td> </tr> <tr> <td><span class='public-api-parameter'>NUMBER</span></td> <td>number</td> <td>45.66, 8453</td> </tr> <tr> <td><span class='public-api-parameter'>PERCENT</span></td> <td>number (between 0 to 100)</td> <td>67.3</td> </tr> <tr> <td><span class='public-api-parameter'>CURRENCY</span>*</td> <td>number</td> <td>34.68</td> </tr> <tr> <td><span class='public-api-parameter'>PHONENUMBER</span></td> <td>string</td> <td>\"+14055766687\"</td> </tr> <tr> <td><span class='public-api-parameter'>EMAILADDRESS</span></td> <td>string</td> <td>\"john.doe@anywhere.com\"</td> </tr> <tr> <td><span class='public-api-parameter'>REFERENCE</span></td> <td>string - the id of another object</td> <td>\"48b009drax\"</td> </tr> <tr> <td><span class='public-api-parameter'>ID</span></td> <td>string - the id of the object</td> <td>\"843hf8484jr84htg\"</td> </tr> <tr> <td><span class='public-api-parameter'>STRING</span></td> <td>string</td> <td>\"whatever you want\"</td> </tr> <tr> <td><span class='public-api-parameter'>STRINGARRAY</span>**</td> <td>array of strings</td> <td>[\"http://customer.com\"]</td> </tr> <tr> <td><span class='public-api-parameter'>URL</span></td> <td>string</td> <td>\"https://crm.com/account/6d4r578f\"</td> </tr> </tbody></table><p>* In the integration send a number value, and specify the correct currency symbol in the Gong UI. Currently Gong does not support multiple currencies per company.<br>** Can only be used for Gong-defined fields.</p><h3>Example</h3><h4>Request</h4><code>POST https://api.gong.io/v2/crm/object/schema?integrationId=6286478263646&objectType=ACCOUNT</code><br><br><code>[{\"uniqueName\": \"orderId\", \"label\": \"ID\", \"type\": \"ID\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},<br>{\"uniqueName\": \"parentAccount\", \"label\": \"Main Account\", \"type\": \"REFERENCE\", \"referenceTo\": \"ACCOUNT\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},<br>{\"uniqueName\": \"category\", \"label\": \"Category\", \"type\": \"PICKLIST\", \"orderedValueList\": [\"Analyst\", \"Competitor\", \"Customer\", \"Integrator\", \"Investor\", \"Partner\", \"Other\"], \"lastModified\": \"2020-11-11T08:11:34+01:00\"}, // custom field<br>{\"uniqueName\": \"industry\", \"isDeleted\": true, \"lastModified\": \"2020-11-21T08:11:34+01:00\"}] // remove custom field</code>
|
523
|
+
# @param body fields
|
524
|
+
# @param integration_id Integration ID generated when creating the integration
|
525
|
+
# @param object_type Type of object to set the schema for (case-sensitive)
|
526
|
+
# @param [Hash] opts the optional parameters
|
527
|
+
# @return [Array<(SchemaUpdateResponse, Integer, Hash)>] SchemaUpdateResponse data, response status code and response headers
|
528
|
+
def upload_crm_schema_field_using_post_with_http_info(body, integration_id, object_type, opts = {})
|
529
|
+
if @api_client.config.debugging
|
530
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.upload_crm_schema_field_using_post ...'
|
531
|
+
end
|
532
|
+
# verify the required parameter 'body' is set
|
533
|
+
if @api_client.config.client_side_validation && body.nil?
|
534
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.upload_crm_schema_field_using_post"
|
535
|
+
end
|
536
|
+
# verify the required parameter 'integration_id' is set
|
537
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
538
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling CRMApi.upload_crm_schema_field_using_post"
|
539
|
+
end
|
540
|
+
# verify the required parameter 'object_type' is set
|
541
|
+
if @api_client.config.client_side_validation && object_type.nil?
|
542
|
+
fail ArgumentError, "Missing the required parameter 'object_type' when calling CRMApi.upload_crm_schema_field_using_post"
|
543
|
+
end
|
544
|
+
# verify enum value
|
545
|
+
if @api_client.config.client_side_validation && !['ACCOUNT', 'CONTACT', 'DEAL', 'LEAD'].include?(object_type)
|
546
|
+
fail ArgumentError, "invalid value for 'object_type', must be one of ACCOUNT, CONTACT, DEAL, LEAD"
|
547
|
+
end
|
548
|
+
# resource path
|
549
|
+
local_var_path = '/v2/crm/object/schema'
|
550
|
+
|
551
|
+
# query parameters
|
552
|
+
query_params = opts[:query_params] || {}
|
553
|
+
query_params[:'integrationId'] = integration_id
|
554
|
+
query_params[:'objectType'] = object_type
|
555
|
+
|
556
|
+
# header parameters
|
557
|
+
header_params = opts[:header_params] || {}
|
558
|
+
# HTTP header 'Accept' (if needed)
|
559
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
560
|
+
# HTTP header 'Content-Type'
|
561
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
562
|
+
|
563
|
+
# form parameters
|
564
|
+
form_params = opts[:form_params] || {}
|
565
|
+
|
566
|
+
# http body (model)
|
567
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
568
|
+
|
569
|
+
return_type = opts[:return_type] || 'SchemaUpdateResponse'
|
570
|
+
|
571
|
+
auth_names = opts[:auth_names] || []
|
572
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
573
|
+
:header_params => header_params,
|
574
|
+
:query_params => query_params,
|
575
|
+
:form_params => form_params,
|
576
|
+
:body => post_body,
|
577
|
+
:auth_names => auth_names,
|
578
|
+
:return_type => return_type)
|
579
|
+
|
580
|
+
if @api_client.config.debugging
|
581
|
+
@api_client.config.logger.debug "API called: CRMApi#upload_crm_schema_field_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
582
|
+
end
|
583
|
+
return data, status_code, headers
|
584
|
+
end
|
585
|
+
# Upload Stages (Deprecated)
|
586
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>This API is <b>Deprecated</b>. Please use \"/object/entities?objectType=STAGE\" API instead.</p><p>Update the list of stages from the CRM system.</p><p>This API must be called before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.</p><div class='public-api-info'><p>The upload stages request should only be sent after:</p><ul> <li>You have created a new integration.</li> <li>There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the '/object/entities' API.</li></ul></div><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.</p>
|
587
|
+
# @param body stages
|
588
|
+
# @param integration_id Integration ID generated when creating the integration
|
589
|
+
# @param [Hash] opts the optional parameters
|
590
|
+
# @return [SchemaUpdateResponse]
|
591
|
+
def upload_stages_using_post(body, integration_id, opts = {})
|
592
|
+
data, _status_code, _headers = upload_stages_using_post_with_http_info(body, integration_id, opts)
|
593
|
+
data
|
594
|
+
end
|
595
|
+
|
596
|
+
# Upload Stages (Deprecated)
|
597
|
+
# <style>.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}</style><p>This API is <b>Deprecated</b>. Please use \"/object/entities?objectType=STAGE\" API instead.</p><p>Update the list of stages from the CRM system.</p><p>This API must be called before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.</p><div class='public-api-info'><p>The upload stages request should only be sent after:</p><ul> <li>You have created a new integration.</li> <li>There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the '/object/entities' API.</li></ul></div><p>When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.</p>
|
598
|
+
# @param body stages
|
599
|
+
# @param integration_id Integration ID generated when creating the integration
|
600
|
+
# @param [Hash] opts the optional parameters
|
601
|
+
# @return [Array<(SchemaUpdateResponse, Integer, Hash)>] SchemaUpdateResponse data, response status code and response headers
|
602
|
+
def upload_stages_using_post_with_http_info(body, integration_id, opts = {})
|
603
|
+
if @api_client.config.debugging
|
604
|
+
@api_client.config.logger.debug 'Calling API: CRMApi.upload_stages_using_post ...'
|
605
|
+
end
|
606
|
+
# verify the required parameter 'body' is set
|
607
|
+
if @api_client.config.client_side_validation && body.nil?
|
608
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CRMApi.upload_stages_using_post"
|
609
|
+
end
|
610
|
+
# verify the required parameter 'integration_id' is set
|
611
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
612
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling CRMApi.upload_stages_using_post"
|
613
|
+
end
|
614
|
+
# resource path
|
615
|
+
local_var_path = '/v2/crm/stages'
|
616
|
+
|
617
|
+
# query parameters
|
618
|
+
query_params = opts[:query_params] || {}
|
619
|
+
query_params[:'integrationId'] = integration_id
|
620
|
+
|
621
|
+
# header parameters
|
622
|
+
header_params = opts[:header_params] || {}
|
623
|
+
# HTTP header 'Accept' (if needed)
|
624
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
625
|
+
# HTTP header 'Content-Type'
|
626
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
627
|
+
|
628
|
+
# form parameters
|
629
|
+
form_params = opts[:form_params] || {}
|
630
|
+
|
631
|
+
# http body (model)
|
632
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
633
|
+
|
634
|
+
return_type = opts[:return_type] || 'SchemaUpdateResponse'
|
635
|
+
|
636
|
+
auth_names = opts[:auth_names] || []
|
637
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
638
|
+
:header_params => header_params,
|
639
|
+
:query_params => query_params,
|
640
|
+
:form_params => form_params,
|
641
|
+
:body => post_body,
|
642
|
+
:auth_names => auth_names,
|
643
|
+
:return_type => return_type)
|
644
|
+
|
645
|
+
if @api_client.config.debugging
|
646
|
+
@api_client.config.logger.debug "API called: CRMApi#upload_stages_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
647
|
+
end
|
648
|
+
return data, status_code, headers
|
649
|
+
end
|
650
|
+
end
|
651
|
+
end
|