This guide assumes the following Managed Packages are installed on Salesforce, and that the reader is set up with the necessary licenses and permissions to access them:
- Logik.io Managed Package
- Logik.io Transaction Manager Extension
Also, this presumes your Logik.ai environment has Transaction Manager enabled.
- Download and install the Salesforce Command Line Interface (CLI) using the instructions here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm
- Download the files in this repository, which contains the components used for Subscriptions in Transaction Manager.
- From the browser, click the
<> Codedropdown for download options. - Alternatively, you can use the
git clonecommand to download the files. For more information, see: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
- From the browser, click the
- If the repository was downloaded as a .zip file, extract the files
- On Windows, right click and select
Extract All.... Follow the prompts that appear on screen. - On Mac, double click the file and its contents will be extracted automatically in the same location.
- On Windows, right click and select
- If it's not already running, launch the program Terminal (on Mac or Linux) or Command Prompt (on Windows).
- Use the change directory (cd) command to navigate to the unzipped directory. For example, if the files were extracted in the Downloads folder, type and enter the command
cd Downloads/salesforce-transaction-subscriptions. - Type and enter the command
lsand a list of files and folders in that directory will be returned. Included in the list should be the foldersrcand the filesfdx-project.json, along with this README. - Run the command
sf auth web login --alias myOrg --instance-url "https://example-dev-ed.my.salesforce.com"- Replace the URL following
--instance-urlwith your Salesforce org URL. - The text following
--aliasis a nickname that is used to identify and reference the correct Salesforce org (multiple Salesforce orgs can be connected to a single machine). The examplemyOrgwill be used for the purposes of this guide; if using another alias here, be sure to use that same alias in the following steps.
- Replace the URL following
- The URL specified in the previous login command will be opened in the default browser. Log in and authorize the
Salesforce CLIconnected app. - In the command line, run the command
sf project deploy start --source-dir src --target-org myOrg. After a few moments, the command line will return a confirmation message,Deploy Succeeded. - (Optional) If the Salesforce org isn’t already open in a browser, it can be opened and logged in by running the command “sf org open --target-org myOrg”.
Note
The user performing this setup needs read/write access to all the components that are included. The included Permission Set "Logik.ai Full Access (Transaction Subscriptions)" (LogikTransactionAssetFullAccess) has access to all direct components. In case you don't see any of the components referenced in this guide, make sure your user has the LogikTransactionAssetFullAccess permission set assigned to them.
- From Setup Home, go to Process Automation → Flows.
- Search for and open the flow
Logik.ai Create Transaction (Record Trigger), API nameLGK__CreateLogikTransactionRecordTrigger. If this flow has an override, open the override instead. - Open the
Create Logik.ai Transactionelement, and make ensure the following parameters:- By default the value for Product Identifier is
ProductCode, but should be defined based on your Logik environment setting for Product Id. Acceptable values areProductCode,PartnerId, orExternalId. - By default the value for Line Update Event is
save, but should be updated to a custom Transaction Header event. To minimize errors, this event should not run additional rules or integrations. Especially, it should not perform a sync integration back to the same Salesforce transaction/lines unless the integration is extensively tested to be stable.
- By default the value for Product Identifier is
If you're using Lightning Record Pages for these objects, these changes should be applied to the Lightning Record Page instead of the standard layout.
- From Object Manager in admin Setup, search for and open the Transaction object.
- Go to Page Layouts → (whichever layout you want to update) → Mobile and Lightning Actions.
- Add the “Update Asset” button to Salesforce Mobile and Lightning Experience Actions on the page. Save.
The Update Assets button on the Transaction detail layout will not appear as long as the Transaction to Asset flow is deactivated.
This example uses the Asset related list on the Account page layout. These steps are available from any Asset list page, adjust the following steps as necessary.
- From Object Manager in admin Setup, open the Account object.
- Go to Page Layouts → (whichever layout you want to update) → Related Lists.
- Under Related Lists, add the Assets object if it's not already added. Click the wrench icon to edit the Assets' related list.
- Click the (+) button on the Buttons toolbar at the bottam of the modal. Move the “Amend” button from Available to Selected.
- Save the changes to the related list (press OK) to close the modal, then click Save to save the changes to the layout.
TBD.