SalesTrip can retrieve data from your corporate card provider and automatically create expense records from card transactions, assigning them to the correct user in the system. Contact SalesTrip to have this enabled, and then follow these instructions.
- Create a Queue. This will own any unrecognised records and can be monitored by a manger.
- Navigate to Setup -> Queues
- Create the Queue and record the "Queue Name" for later
- The queue should be able to hold records of type "Payment Method" and "SalesTrip Transaction"
- Add any users you want to be responsible for managing unmatched records and reassigning ownership
- (optional) If your card provider allows you to add an "Employee Id" to each card, ensure this has been set up with the card provider, and also that the same value for "Employee Id" is recorded on a field on the user object in Salesforce.
- Navigate to the tab named Financial Provider Connections and create a new record
- Give the connection a recognisable name e.g. "Company Bank Corporate Card Arrangement"
- Set the Connection as Active
- Enter in "Start" the date of the earliest transaction which should be imported
- In Provider Id enter the id supplied by SalesTrip, e.g. "company_bank"
- In "Unassigned Queue Name" the "Queue Name" you created earlier (not Label).
- In Employee Id Field the API name for the field on the user object which contains the Employee Id shared with your card provider.
- Check "Employee Reimbursable" to define whether "Employee Reimbursable" on the Payment Methods created by the integration is checked. You can subsequently use this to identify which Expenses are reimbursable to the employee and which are already company paid.
- Record the Financial Provider Record Id in the address bar. e.g. if the URL is https://salestrip.lightning.force.com/lightning/r/salestrip__FinancialProviderConnection__c/a0b000000000000000/view, the id is the text a0b000000000000000.
- Schedule the retrieval
- Open Developer console, Debug menu, Execute Anonymous
- Define your CRON expression for how regular your retrievals are - SalesTrip or your bank may make a recommendation, in the example below it's been set at "0 0 0 * * ?" which means it runs at 00:00:00 every day. Get more information on CRON expressions here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm
- Execute the following
System.schedule('Card Data Feed', '0 0 0 * * ?', new salestrip.CorporateCardRetrievalSchedule('a0b000000000000000'));
When the card feed has synced, you can check for unassigned Payment Methods (cards issued under the corporate card agreement), on the related list from the Financial Provider Connection record. On assigning ownership of the card (Payment Method) to the Salesforce user, the transactions will also be reassigned, and Expenses generated for them, all owned by that owner.
Any future transactions on that card will result in new Expenses owned by the same user.
* You may need to disable the "CannotUpdateCard" validation rule on the SalesTrip "Payment Method" object if you initially installed an early version of the SalesTrip app.