Example 4: Export and Sync with External Systems
This workflow ensures project data and files are seamlessly synchronized with external systems like ERPs or CMSs.
Steps:
-
Create Project:
Use theexternal_reference_id
parameter in the Create Project API to link the magicplan project to your local system. -
Export Trigger:
-
Once the project appears in the user's app, they can open the magicplan app.
-
Upon completing the project, the user presses the Custom Export button, signaling that the project is ready for export.
-
-
Webhook Notification:
magicplan sends aPOST
request to yourwebhook_url
, including:-
The
listing
parameter, which identifies the local project linked to the magicplan project. -
File URLs (valid for 60 minutes).
-
Additional project metadata.
-
-
File Synchronization:
Files are downloaded and synced with external systems like:-
ERPs for billing or inventory.
-
CMSs for client-facing content.
-
-
Webhook Response:
-
Status
0
: Confirms success to magicplan. -
Other statuses: Prompts an error in the app, allowing retries.
-
-
Activity Logging:
Log the export and synchronization activity for auditing purposes.
Use Case Example
A retail company syncs floor plans with their ERP for inventory and uploads visualizations to a CMS for clients.