Cross Organization data sharing allows you to share and view the data from one organization to another. This will be very helpful for the business people to showcase their data. For example, an organization can share their product details with another partner organization.
The cross-organization data sharing can be achieved with the help of these concepts.
A Hub holds the objects and fields that you want to share with another organization. Salesforce enforces access permission for these objects and fields.
A Spoke is a proxy version of object shared by hub with the organization that you want to share. If Spoke needs to get the updated data from Hub, then it is necessary to manually synchronize the Spoke with Hub.
Let’s see in detail how we the Hub & Spoke work together:
In order to create Hub,
Go To -> Setup -> Administration Setup -> Data Management -> Cross-Organization Data -> Hub Configuration.
- Click ‘New’, provide the Hub name, and save it.
- Select the objects that you want to share with other organization, and save it.
- Then select the fields of the specified object, by clicking the object link, and save it.
- Now, create a Spoke connection, by clicking ‘Spoke Connection’ button and save the code generated by Salesforce. Status of the connection will be ‘Pending’ until the other organization accepts the connection.
Now let’s log i to the another organization that you want to share the details.
Go To -> Setup -> Administration Setup -> Data Management -> Cross-Organization Data -> Spoke Configuration.
- Enter the name for the spoke by clicking ‘New XOrgSpoke’ and save it.
- Click ‘Accept Invitation’ button and paste the code generated by the organization that created the Hub.
- Click ‘OK’ by verifying that is the organization you want to get the details. Now, you will see the status as ‘Contacting Hub.. .’ Once it is connected, it shows as ‘Connected’.
- Now, click ‘Sync with Hub’ to get the details of the object from the Hub Organization.
Once the Spoke gets connected, it will display the objects and fields that is available in the Hub with the API name appended with __xo. To get the latest version of metadata, you need to click ‘Sync with Hub’ button again.
The Hub and Spoke technique is a simple and elegant way to share the data from one organization to another organization in a hassle free manner.
To learn more about Hub and Spoke, and their limitations, please refer Salesforce Cross-Organization Data Sharing