Another Shopify Connector

SF unlocked package

Example URL is IMPORTANT

https://e2830bf848c84f0147e801c9ef16ff67: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@bluejayclub-dev.myshopify.com/admin/api/2021-04/orders.json

{ “webhooks”: [ { “id”: 1024452853960, “address”: “https://bluejayclub-developer-edition.na156.force.com/bluejayfc/services/apexrest/GUIJEShopifyWS”, “topic”: “customers/create”, “created_at”: “2021-04-12T21:02:04+07:00”, “updated_at”: “2021-04-12T21:02:04+07:00”, “format”: “json”, “fields”: [], “metafield_namespaces”: [], “api_version”: “2021-04”, “private_metafield_namespaces”: [] }, { “id”: 1024452886728, “address”: “https://bluejayclub-developer-edition.na156.force.com/bluejayfc/services/apexrest/GUIJEShopifyWS”, “topic”: “customers/update”, “created_at”: “2021-04-12T21:02:04+07:00”, “updated_at”: “2021-04-12T21:02:04+07:00”, “format”: “json”, “fields”: [], “metafield_namespaces”: [], “api_version”: “2021-04”, “private_metafield_namespaces”: [] }, { “id”: 1024452919496, “address”: “https://bluejayclub-developer-edition.na156.force.com/bluejayfc/services/apexrest/GUIJEShopifyWS”, “topic”: “orders/create”, “created_at”: “2021-04-12T21:02:04+07:00”, “updated_at”: “2021-04-12T21:02:04+07:00”, “format”: “json”, “fields”: [], “metafield_namespaces”: [], “api_version”: “2021-04”, “private_metafield_namespaces”: [] }, { “id”: 1024452952264, “address”: “https://bluejayclub-developer-edition.na156.force.com/bluejayfc/services/apexrest/GUIJEShopifyWS”, “topic”: “orders/updated”, “created_at”: “2021-04-12T21:02:05+07:00”, “updated_at”: “2021-04-12T21:02:05+07:00”, “format”: “json”, “fields”: [], “metafield_namespaces”: [], “api_version”: “2021-04”, “private_metafield_namespaces”: [] } ]}

Tiger, Dragon and a gang of merchants

Ingredients:

  • (1) A Shopify store front
  • (2) A Shopify Partner Account aka developer account
  • (3) Create a private app and get API key and secret

1 – STORE FRONT

https://bluejayclub-dev.myshopify.com

3 – PRIVATE APP

Token: e2830bf848c84f0147e801c9ef16ff67

Secret: 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

Salesforce

To do: create a private app for token generation, add the URL into the remote site settings in Salesforce and make Salesforce as a trusted site for Shopify

1 – Create Remote Site Setting
2 – Create Self-Signed certificate

Shopify

Create some sample products
Get product json data

https://bluejayclub-dev.myshopify.com/admin/api/2021-01/products.json

Raw data

Json Beautifier

SOQL Query Cheat Sheet for Salesforce Metadata

Action Link Group Templates
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, ExecutionsAllowed, HoursUntilExpiration, Category, IsPublished FROM ActionLinkGroupTemplate

Apex Class
Select Id, NamespacePrefix, Name, ApiVersion, Status, IsValid, BodyCrc, Body, LengthWithoutComments, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM ApexClass

Apex Trigger
Select Id, Name FROM apextrigger

App
Select Id, Name FROM AppMenuItem

Asset Files
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, ContentDocumentId FROM ContentAsset

Assignment Rules
Select Id, Name, SobjectType, Active, CreatedById, CreatedDate, LastModifiedById, LastModifiedDate, SystemModstamp FROM AssignmentRule

Auth.Provider
SELECT AuthorizeUrl, CustomMetadataTypeRecord, DeveloperName, FriendlyName, Id FROM AuthProvider

Button or Link
Select Id, PageOrSobjectType, Name, IsProtected, Url, EncodingKey, LinkType, OpenType, Height, Width, ShowsLocation, HasScrollbars, HasToolbar, HasMenubar, ShowsStatus, IsResizable, Position, ScontrolId, MasterLabel, Description, DisplayType, RequireRowSelection, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM WebLink

CORSWhitelist origin
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, UrlPattern FROM CorsWhitelistEntry

Call Center
Select Id, Name, InternalName, Version, AdapterUrl, CustomSettings, SystemModstamp, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById FROM CallCenter

Chatter Extension
SELECT CommentCount, CommentReceivedCount, Id, InfluenceRawRank, LikeReceivedCount, ParentId, PostCount, SystemModstamp FROM ChatterActivity

Custom Permission
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, IsProtected, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Description FROM CustomPermission

Dashboard
select Id, title from Dashboard

Document
select Id, name from document

Duplicate Rule
Select Id, IsDeleted, SobjectType, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, IsActive, SobjectSubtype FROM DuplicateRule

Email Template
select Id, name from emailtemplate

Event subscription
Select Id, ParentId, SubscriberId, CreatedById, CreatedDate, IsDeleted FROM EntitySubscription

External Data source
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Type, Endpoint, Repository, IsWritable, PrincipalType, Protocol, AuthProviderId, LargeIconId, SmallIconId, CustomConfiguration FROM ExternalDataSource

Flow Definition
Select Id, DurableId, QualifiedApiName, EntityDefinitionId, NamespacePrefix, DeveloperName, MasterLabel, Label, Length, DataType, ServiceDataTypeId, ValueTypeId, ExtraTypeInfo, IsCalculated, IsHighScaleNumber, IsHtmlFormatted, IsNameField, IsNillable, IsWorkflowFilterable, IsCompactLayoutable, Precision, Scale, IsFieldHistoryTracked, IsIndexed, IsApiFilterable, IsApiSortable, IsListFilterable, IsListSortable, IsApiGroupable, IsListVisible, ControllingFieldDefinitionId, LastModifiedDate, LastModifiedById, PublisherId, RunningUserFieldAccessId, RelationshipName, ReferenceTo, ReferenceTargetField, IsCompound FROM FieldDefinition where DurableId=” 
Folder
Select Name, DeveloperName FROM Folder

Group
Select Id, Name, DeveloperName, RelatedId, Type, Email, OwnerId, DoesSendEmailToMembers, DoesIncludeBosses, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM Group

Letter Head
Select Id, Name, DeveloperName, IsActive, Description, Value, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM BrandTemplate

Lightning component bundle
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, ApiVersion, Description FROM AuraDefinitionBundle

Lightning Page
Select Id, IsDeleted, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, AuraDefinitionBundleId, DefType, Format, Source FROM AuraDefinition

List View
Select Id, Name, DeveloperName, NamespacePrefix, SobjectType, IsSoqlCompatible, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastViewedDate, LastReferencedDate FROM ListView

Matching Rule
Select Id, IsDeleted, SobjectType, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, MatchEngine, BooleanFilter, Description, RuleStatus, SobjectSubtype FROM MatchingRule

Named Credential
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Endpoint, PrincipalType, CalloutOptionsGenerateAuthorizationHeader, CalloutOptionsAllowMergeFieldsInHeader, CalloutOptionsAllowMergeFieldsInBody, AuthProviderId FROM NamedCredential
Permission set
select id, name from permissionset

Platform Cache Partition
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Description, IsDefaultPartition FROM PlatformCachePartition

Queue
select Id from Group where Type = ‘Queue’

Record Type
SELECT id,name  from RecordType

Report
SELECT id, name from report

Role
Select Id, Name, ParentRoleId, RollupDescription, OpportunityAccessForAccountOwner, CaseAccessForAccountOwner, ContactAccessForAccountOwner, ForecastUserId, MayForecastManagerShare, LastModifiedDate, LastModifiedById, SystemModstamp, DeveloperName, PortalAccountId, PortalType, PortalAccountOwnerId FROM UserRole

Security custom Baseline
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Baseline FROM SecurityCustomBaseline

Site.com
Select Id, Name, Subdomain, UrlPathPrefix, GuestUserId, Status, AdminId, OptionsEnableFeeds, OptionsRequireHttps, OptionsAllowHomePage, OptionsAllowStandardIdeasPages, OptionsAllowStandardSearch, OptionsAllowStandardLookups, OptionsAllowStandardAnswersPages, OptionsAllowGuestSupportApi, OptionsAllowStandardPortalPages, Description, MasterLabel, AnalyticsTrackingCode, SiteType, ClickjackProtectionLevel, DailyBandwidthLimit, DailyBandwidthUsed, DailyRequestTimeLimit, DailyRequestTimeUsed, MonthlyPageViewsEntitlement, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM Site
Static Resource
SELECT body, name from StaticResource

User Provisioning config
Select Id, IsDeleted, DeveloperName, Language, MasterLabel, NamespacePrefix, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, ConnectedAppId, Notes, Enabled, ApprovalRequired, UserAccountMapping, EnabledOperations, OnUpdateAttributes, LastReconDateTime, NamedCredentialId, ReconFilter FROM UserProvisioningConfig

Visualforce component
Select Id, NamespacePrefix, Name, ApiVersion, MasterLabel, Description, ControllerType, ControllerKey, Markup, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM ApexComponent

Visual force page
Select Id, NamespacePrefix, Name, ApiVersion, MasterLabel, Description, ControllerType, ControllerKey, IsAvailableInTouch, IsConfirmationTokenRequired, Markup, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp FROM ApexPage

Zone
Select Id, SystemModstamp, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, Name, Description, IsActive, IsPublished FROM Community