How to export and Import Apps

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