# How to export and Import Apps

**URL:** https://community.sapphireims.com/t/how-to-export-and-import-apps/896
**Category:** SapphireApps
**Tags:** how-to
**Created:** [May 30, 2024, 6:19am UTC](https://community.sapphireims.com/t/how-to-export-and-import-apps/896 "2024-05-30T06:19:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dipak183](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@dipak183](https://community.sapphireims.com/u/dipak183)
#### Post date: [May 30, 2024, 6:19am UTC](https://community.sapphireims.com/t/how-to-export-and-import-apps/896/1 "2024-05-30T06:19:31Z")

</div>

Important Note: After installing/upgrading Sapphire-Apps.exe IMPORT settings and KB Apps. Later Import/Export other Apps

Setups to Copy App:

- Open MySQL Workbench or similar Application
- Create schema as ‘master’ in DB
- Import ‘Master Schema.sql’ into master schema
- Use below query for exporting existing App from one Customer to another:

Export Query Syntax:  
CALL Export (\<{tenant\_id}\>, \<{app\_name}\>, \<{app\_id}\>, \<{app\_version}\>, \<{Schema\_name}\>);

Example as below:  
CALL Export (‘2022070917349cb14117724ab4b42ffd17c8072ecb’ ,'Customer1 APP ’ ,‘2022080913-857f147f-0d93-45d3-b1e2-a07a707a5458’ ,1.0 ,‘rpa’ );

Change the following details according to the Customer:  
Note: Tenant ID, App Name and App ID changes based on customer.

Examples:  
Customer1 Tenant ID - ‘2022070917349cb14117724ab4b42ffd17c8072ecb’  
Get Customer1 Tenant ID from - rpa.automation\_tenant  
App Name - ‘Customer1 APP’  
Get App Name from – SapphireApps Home page \> Copy App Name  
Customer1 APP ID - ‘2022080913-857f147f-0d93-45d3-b1e2-a07a707a5458’  
Get Customer1 APP ID from – SapphireApps Home page \> Click on App \> Copy metadataId from the URL

SapphireApps Version -1.0  
SapphireApps Schema Name – rpa

Importing App:  
Use below query to import App to destination customer

Import Query Syntax:  
CALL Import (\<{tenant\_id}\>, \<{app\_name}\>, \<{app\_version}\>, \<{Schema\_name}\>);

Example as below:  
CALL Import (‘2022070911136b285b222847258d1a2c7a73fcb8ce’,‘Customer1 APP’,1.0,‘rpa’) ;

Change the following details according to the Customer:  
Note:Tenant ID and App ID changes based on customer.

Examples:  
Customer2 Tenant ID - ‘2022070911136b285b222847258d1a2c7a73fcb8ce’  
Get Customer2 Tenant ID from - rpa.automation\_tenant  
App Name - ‘Customer1 APP’  
Get App Name from - Export query  
SapphireApps Version -1.0  
SapphireApps Schema Name –rpa

Use this Query to import SapphireApps Settings:  
CALL Import (‘2022070917349cb14117724ab4b42ffd17c8072ecb’,‘settings’,1.0,‘rpa’) ;

Change the following details according to the Customer:

Examples:  
Customer Tenant ID - ‘2022070917349cb14117724ab4b42ffd17c8072ecb’  
SapphireApps Version -1.0  
‘settings’ and ‘rpa’ remains same

Use this Query to import KB Settings:  
CALL Import (‘2022070917349cb14117724ab4b42ffd17c8072ecb’,‘KB’,2.3,‘rpa’) ;

Change the following details according to the Customer:

Examples:  
Customer Tenant ID -‘2022070917349cb14117724ab4b42ffd17c8072ecb’  
SapphireApps Version -2.3  
‘KB’ and ‘rpa’ remains same
