{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":25764,"path":"it-asset-management/saas-license-management/create-slc-store-app.md","title":"Create a store app for a custom integration","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a store app for a custom integration\n\nPublish your custom integration application on the ServiceNow Store to make it available for others to use.\n\n## Before you begin\n\nRole required: admin\n\n## About this task\n\nYou must complete these steps so that your custom integration works correctly when other users download it from the ServiceNow Store.\n\n## Procedure\n\n1.  Create a fix script in your custom integration application.\n\n    When a new integration profile is created using your application, the subflows and connection alias you created are automatically linked to the profile through this fix script.\n\n    1.  Navigate to **System Applications** &gt; **Studio**.\n\n    2.  Select your custom integration application.\n\n    3.  On the Welcome to Studio page, click **+ Create New**.\n\n        The Create Application File dialog box opens.\n\n    4.  On the dialog box, search for and select `Fix Script`.\n\n    5.  Click **Create**.\n\n    6.  On the Fix Script form, fill in the following fields.\n\n        |Field|Value|\n        |-----|-----|\n        |Name|Name of the fix script. For example, `Custom Integration Fix Script`.|\n        |Unloadable|Option to create Customer Update \\[sys\\_update\\_xml\\] records when the fix script runs. Do not select this option.|\n        |Application|Your custom integration application. This field is populated automatically.|\n        |Before|Option that enables you to run the fix script before installing or upgrading the application. Do not select this option.|\n        |Description|Description of the fix script.|\n\n    7.  Enter the following script in the **Script** field.\n\n        For the subflows and connection alias, replace the example ids with the real ids. You can find the id in the URL for each item.\n\n        ```\n        new global.CustomIntegrationProfileUtils().createCustomIntegration({\n        \tname: 'Name', // choose a name for the integration\n        \tdownloadSubscriptionSubflow: '3a23e189a1400010fa9bed1383c83d38', //replace example id\n        \tupdateActivitySubflow: '77a66d23e5500010fa9bc9581d0c0f47', //replace example id\n        \treclamationSubflow: 'e62b672e39400010fa9b4845e477fe02', //replace example id\n        \tconnectionAlias: '629ad2bfdb1893005963ff041d961971' //replace example id\n        });\n        ```\n\n        **Note:** The update activity and reclamation subflows are not required. If you do not include a subflow to update activity, the integration does not get user activity unless your download subscription subflow includes user activity. If you do not include a reclamation subflow, the integration cannot deactivate SaaS user subscriptions.\n\n    8.  Click **Submit**.\n\n2.  Create a cross scope privilege record.\n\n    This record allows the fix script you created to access the CustomIntegrationProfileUtils\\(\\) script include.\n\n    1.  Navigate to **System Applications** &gt; **Application Cross-Scope Access**.\n\n    2.  Click **New**.\n\n    3.  On the form, fill in the fields.\n\n<table id=\"table_dcv_pkm_4kb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nValue\n\n</th></tr></thead><tbody><tr><td>\n\nSource Scope\n\n</td><td>\n\nYour custom integration application. This field is populated automatically.\n\n To select a different application, click the Settings \\(\\[Omitted image \"List\\_PersonalizeListIcon.png\"\\] Alt text: Settings icon\\) icon on the banner frame of your ServiceNow instance. On the System Settings dialog box, select the **Developer** tab and then choose an application from the **Application** drop-down list.\n\n</td></tr><tr><td>\n\nTarget Scope\n\n</td><td>\n\nApplication from which resources are being requested. Select the search\\[Omitted image \"search-icon.png\"\\] Alt text:icon to locate and select the **Global** application.\n\n</td></tr><tr><td>\n\nTarget Name\n\n</td><td>\n\nName of the script include. Set this field to `CustomIntegrationProfileUtils`.\n\n</td></tr><tr><td>\n\nTarget Type\n\n</td><td>\n\nType of request. Select **Script Include**.\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nYour custom integration application. This field is populated automatically.\n\n</td></tr><tr><td>\n\nOperation\n\n</td><td>\n\nOperation that the script performs on the target scope. Select **Execute API**.\n\n</td></tr><tr><td>\n\nStatus\n\n</td><td>\n\nAuthorization for this cross scope privilege record. Select **Allowed**.\n\n</td></tr></tbody>\n</table>    4.  Click **Submit**.\n\n\n## What to do next\n\nBefore you publish your custom integration application on the ServiceNow Store, make sure that your actions and subflows are active, published, and saved in your application.\n\n"}}