SF Scraper — SuccessFactors Browser Scraping Skill
Scrape employee data from a live, logged-in SAP SuccessFactors session via browser automation.
This skill uses ONLY browser snapshots and actions — zero API calls.
Prerequisites
- User must have SAP SuccessFactors open and logged in on a Chrome tab.
- OpenClaw Browser Relay Chrome extension must be active (badge ON) on that tab.
- Always use
profile="chrome" for all browser calls (we need the authenticated session).
Step-by-Step Workflow
Step 1: Verify Session & Get Base URL
browser(action="snapshot", profile="chrome", compact=true)
Check for these states:
- Login page detected (look for: "Log in", "Username", "Password", "Company ID" fields) → Tell user to log in first and re-attach the relay.
- Session expired ("Session Timeout", "session has expired") → Same, ask user to re-login.
- SF Home/Dashboard → Good. Extract the base URL from the page URL in the snapshot. It will be one of:
https://<company>.successfactors.com
https://<company>.successfactors.eu
https://<company>.sapsf.com
https://pmsalesdemo<N>.successfactors.com (demo instances)
https://hcm<N>preview.sapsf.com (preview instances)
Store the base URL — all subsequent navigation uses it.
Step 2: Navigate to Employee Profile
Try these navigation strategies in order. Move to the next only if the current one fails.
Strategy A: People Profile Deep Link (preferred)
browser(action="navigate", profile="chrome", targetUrl="{base_url}/sf/liveprofile?selected_user={employee_id}")
Wait 2-3 seconds for load, then snapshot. This is the most reliable deep link in modern SF instances.
Success indicators:
- Page contains a heading with a person's name
- You see sections like "Personal Information", "Job Information", "About Me"
- URL contains
liveprofile and the employee ID
Failure indicators:
- Blank page, spinner that never resolves
- "Page not found", "Error", or redirect to home
- Generic dashboard with no employee context
Strategy B: Alternative Deep Links
If Strategy A fails, try these one at a time:
{base_url}/xi/ui/peopleprofile/pages/index.xhtml?selected_user={employee_id}
{base_url}/sf/peopleprofile?selected_user={employee_id}
{base_url}/#/userprofile/{employee_id}
{base_url}/sf/admin/employeefiles?selected_user={employee_id}
Same validation — snapshot after each and check for profile content.
Strategy C: Global Search Bar
If all deep links fail, use the search:
- Snapshot the current page.
- Find the search element. Look for:
- A
searchbox role element (most common)
- A
textbox with placeholder containing "Search", "Search People", "Find Someone"
- An element with aria-label containing "search"
- The magnifying glass icon / search icon button (click it first to expand the search bar)
- Click the search box to focus it.
- Type the employee ID:
browser(action="act", profile="chrome", request={kind: "type", ref: "<search_ref>", text: "{employee_id}"})
- Press Enter or click the search button:
browser(action="act", profile="chrome", request={kind: "press", ref: "<search_ref>", key: "Enter"})
- Wait 2-3 seconds, then snapshot the results.
- Parse the results:
- If one result → click it to open the profile.
- If multiple results → look for the one matching the employee ID. Results typically show as a list with name, ID, and photo. Click the correct one.
- If no results → report to user that employee ID was not found.
Strategy D: Admin Center / Employee Files
Last resort — navigate through menus:
- Navigate to
{base_url}/sf/admin
- Snapshot, look for "Employee Files" or "Manage Employees" link
- Click it, then use the search/filter within that view
- Find and click the employee
Step 3: Handle Page Loading & Iframes
SuccessFactors heavily uses iframes and lazy loading. Critical handling:
Iframe detection:
Lazy loading / SPA transitions:
- SuccessFactors is a Single Page Application. After navigation, content may take 3-5 seconds to render.
- Always snapshot twice if the first snapshot shows loading indicators:
- Loading spinners: look for "Loading", "Please wait", spinner icons, progress bars
- Wait 3 seconds between snapshots
- If still loading after 2 retries (total ~9 seconds), inform user of slow load
Popup/Modal handling:
- SF sometimes shows popups ("What's New", cookie consent, tour prompts)
- If a modal/dialog appears, look for "Close", "X", "Dismiss", "Got it", "Skip" buttons
- Click to dismiss, then re-snapshot
Step 4: Scrape the Profile Page
Once on the employee profile, take a detailed snapshot:
browser(action="snapshot", profile="chrome")
SuccessFactors People Profile has these typical sections/cards:
Header / Banner Area
Contains the most important info, always visible at top:
- Full Name — Large heading text, usually
heading level 1 or 2
- Job Title — Text directly below the name
- Photo — Avatar image (not scrapable as data, but confirms you're on the right profile)
- Employee ID — Sometimes shown near name, sometimes in a subtitle like "ID: 12345"
- Quick action buttons — Email, phone icons (these contain contact data)
Info Cards / Sections (varies by company config)
Each card has a header and key-value pairs. Common patterns:
"Personal Information" / "About" card:
- First Name, Last Name, Middle Name
- Preferred Name / Display Name
- Date of Birth (may be restricted)
- Gender
- Nationality
- Marital Status
"Job Information" card:
- Job Title / Position Title
- Job Code
- Department / Division / Business Unit
- Cost Center
- Employment Type (Full-time, Part-time, etc.)
- Employee Class / Employee Type
- Regular/Temporary
- Standard Hours
- FTE (Full-Time Equivalent)
- Pay Grade
- Worker's Compensation Code
"Employment Details" / "Employment Information" card:
- Hire Date / Original Start Date
- Seniority Date
- Service Date
- Last Date Worked
- Termination Date (if applicable)
- Employment Status (Active, Terminated, Leave, etc.)
"Compensation Information" card (may be restricted):
- Annual Salary / Base Pay
- Pay Component
- Currency
- Compa-Ratio
- Range Penetration
"Contact Information" card:
- Business Email
- Personal Email
- Business Phone
- Mobile Phone
- Home Phone
- Business Address (Street, City, State, Zip, Country)
- Home Address
"Organizational" / "Position" card:
- Manager Name (usually a clickable link)
- Manager ID
- Position
- Direct Reports count
- Legal Entity
- Company Code
"Spot Profile" / "About Me" card:
- Bio / About Me text
- Skills
- Interests
- Social accounts
How to Extract Key-Value Pairs
In the accessibility tree snapshot, profile data appears as:
- Labels —
text or label nodes with the field name (e.g., "Department")
- Values — Adjacent
text, link, or statictext nodes with the value (e.g., "Engineering")
- Pattern: label followed by its value, often in a grid/table or definition list structure
Example snapshot patterns:
text "Department"
text "Engineering"
text "Manager"
link "Jane Smith"
text "Location"
text "Bangalore, India"
text "Email"
link "john.doe@company.com"
Scan sequentially and pair each label with its following value.
Step 5: Navigate Tabs for More Data
SuccessFactors profiles often organize data into tabs or collapsible sections.
Common tab names:
- "Personal Information" / "Personal Info"
- "Job Information" / "Job Info"
- "Employment Information" / "Employment Details"
- "Compensation Information" / "Compensation"
- "Pay Components" / "Pay Details"
- "Organizational Information" / "Organization"
- "Contact Information"
- "Documents"
- "Performance History"
- "Goal Plan"
- "Time Off" / "Leave"
To navigate tabs:
- Snapshot and identify tab elements (role:
tab, tablist, or clickable links with these names)
- Click the tab you need:
browser(action="act", profile="chrome", request={kind: "click", ref: "<tab_ref>"})
- Wait 1-2 seconds for content to load
- Snapshot again and extract the new section's data
Collapsible sections:
- Some profiles use expandable/collapsible sections instead of tabs
- Look for
button elements with section names and expand/collapse indicators
- Click to expand if collapsed, then snapshot
Step 6: Handle "Show More" / Pagination
- Some sections show limited data with a "Show More", "View All", or "See More" link
- Click it if present to reveal full data, then re-snapshot
- Employment history or compensation history may have multiple records — scrape all visible
Step 7: Return Results
Format results clearly, grouped by section:
═══ Employee Profile ═══
👤 Basic Info
Name: John Doe
Employee ID: 12345
Job Title: Senior Developer
Department: Engineering
📧 Contact
Email: john.doe@company.com
Phone: +91-9876543210
Location: Bangalore, India
🏢 Organization
Manager: Jane Smith
Division: Technology
Business Unit: Product Development
Legal Entity: Company India Pvt Ltd
📋 Employment
Hire Date: 2020-03-15
Status: Active
Type: Full-Time Regular
Rules:
- Only include fields actually found on the page — NEVER fabricate data
- If a field's value is empty or hidden ("*****", "Restricted"), report it as restricted
- If the user only asked for a name, don't scrape every tab — just return what's visible in the header
Batch Mode
For multiple employee IDs:
- Process one at a time sequentially
- After each profile, navigate to the next using Strategy A
- Collect all results
- Present as a formatted table at the end
- Note any IDs that failed
Configuration (Optional)
User can add to TOOLS.md:
### SuccessFactors
- Base URL: https://yourcompany.successfactors.com
- Default fields: name, email, department, manager
If configured, use the base URL directly (skip discovery). If default fields are specified, only scrape those.
Error Handling
| Scenario |
Detection |
Action |
| Not logged in |
Login form visible |
Tell user to log in and re-attach relay |
| Session expired |
"Session Timeout" text |
Same as above |
| Employee not found |
Search returns 0 results |
Report clearly, suggest checking ID |
| Access denied |
"Unauthorized", "No access", "Insufficient privileges" |
Report — user may lack permissions |
| Profile restricted |
Fields show "*****" or "Restricted" |
Report which fields are restricted |
| Page won't load |
Loading spinner after 3 retries |
Report timeout, suggest refreshing SF |
| Multiple matches |
Search returns >1 result |
List matches with names/IDs, ask user to pick |
| Wrong instance |
URL doesn't match expected SF domain |
Warn user, ask to confirm |
Important Notes
- NEVER use OData, REST API, or any programmatic endpoint. Pure browser scraping only.
- Always use
profile="chrome" — never profile="openclaw" (need the user's auth session).
- Be patient — SF can be slow. Always verify page state with snapshots before extracting.
- Don't navigate away from SF without warning the user.
- Respect permissions — if data is restricted/hidden in the UI, it's restricted for a reason. Don't try to circumvent.
- Screenshot fallback — if snapshot (accessibility tree) doesn't capture visible text, use
browser(action="screenshot", profile="chrome") to see the rendered page visually and extract from the image.
1---
2name: sf-scraper
3description: >
4 Scrape employee data from a logged-in SAP SuccessFactors browser session using browser automation.
5 Use when: user provides an employee ID and wants employee details (name, email, department, manager, etc.)
6 scraped directly from the SuccessFactors UI — NOT via OData/API. Requires the user to have
7 SuccessFactors open and logged in via Chrome with the OpenClaw Browser Relay extension attached.
8 Triggers on: "get employee name", "look up employee", "scrape SF", "find employee in SuccessFactors",
9 or any request combining an employee ID with SuccessFactors data lookup.
10metadata:
11 source: https://skillmd.com/skills/modbender/sf-scraper
12---
13
14# SF Scraper — SuccessFactors Browser Scraping Skill
15
16Scrape employee data from a live, logged-in SAP SuccessFactors session via browser automation.
17This skill uses ONLY browser snapshots and actions — zero API calls.
18
19## Prerequisites
20
21- User must have SAP SuccessFactors open and logged in on a Chrome tab.
22- OpenClaw Browser Relay Chrome extension must be active (badge ON) on that tab.
23- **Always** use `profile="chrome"` for all browser calls (we need the authenticated session).
24
25## Step-by-Step Workflow
26
27### Step 1: Verify Session & Get Base URL
28
29```
30browser(action="snapshot", profile="chrome", compact=true)
31```
32
33**Check for these states:**
34
35- **Login page detected** (look for: "Log in", "Username", "Password", "Company ID" fields) → Tell user to log in first and re-attach the relay.
36- **Session expired** ("Session Timeout", "session has expired") → Same, ask user to re-login.
37- **SF Home/Dashboard** → Good. Extract the base URL from the page URL in the snapshot. It will be one of:
38 - `https://<company>.successfactors.com`
39 - `https://<company>.successfactors.eu`
40 - `https://<company>.sapsf.com`
41 - `https://pmsalesdemo<N>.successfactors.com` (demo instances)
42 - `https://hcm<N>preview.sapsf.com` (preview instances)
43
44Store the base URL — all subsequent navigation uses it.
45
46### Step 2: Navigate to Employee Profile
47
48Try these navigation strategies **in order**. Move to the next only if the current one fails.
49
50#### Strategy A: People Profile Deep Link (preferred)
51
52```
53browser(action="navigate", profile="chrome", targetUrl="{base_url}/sf/liveprofile?selected_user={employee_id}")
54```
55
56Wait 2-3 seconds for load, then snapshot. This is the most reliable deep link in modern SF instances.
57
58**Success indicators:**
59- Page contains a heading with a person's name
60- You see sections like "Personal Information", "Job Information", "About Me"
61- URL contains `liveprofile` and the employee ID
62
63**Failure indicators:**
64- Blank page, spinner that never resolves
65- "Page not found", "Error", or redirect to home
66- Generic dashboard with no employee context
67
68#### Strategy B: Alternative Deep Links
69
70If Strategy A fails, try these one at a time:
71
72```
73{base_url}/xi/ui/peopleprofile/pages/index.xhtml?selected_user={employee_id}
74{base_url}/sf/peopleprofile?selected_user={employee_id}
75{base_url}/#/userprofile/{employee_id}
76{base_url}/sf/admin/employeefiles?selected_user={employee_id}
77```
78
79Same validation — snapshot after each and check for profile content.
80
81#### Strategy C: Global Search Bar
82
83If all deep links fail, use the search:
84
851. **Snapshot** the current page.
862. **Find the search element.** Look for:
87 - A `searchbox` role element (most common)
88 - A `textbox` with placeholder containing "Search", "Search People", "Find Someone"
89 - An element with aria-label containing "search"
90 - The magnifying glass icon / search icon button (click it first to expand the search bar)
913. **Click** the search box to focus it.
924. **Type** the employee ID:
93 ```
94 browser(action="act", profile="chrome", request={kind: "type", ref: "<search_ref>", text: "{employee_id}"})
95 ```
965. **Press Enter** or click the search button:
97 ```
98 browser(action="act", profile="chrome", request={kind: "press", ref: "<search_ref>", key: "Enter"})
99 ```
1006. **Wait 2-3 seconds**, then snapshot the results.
1017. **Parse the results:**
102 - If one result → click it to open the profile.
103 - If multiple results → look for the one matching the employee ID. Results typically show as a list with name, ID, and photo. Click the correct one.
104 - If no results → report to user that employee ID was not found.
105
106#### Strategy D: Admin Center / Employee Files
107
108Last resort — navigate through menus:
109
1101. Navigate to `{base_url}/sf/admin`
1112. Snapshot, look for "Employee Files" or "Manage Employees" link
1123. Click it, then use the search/filter within that view
1134. Find and click the employee
114
115### Step 3: Handle Page Loading & Iframes
116
117SuccessFactors heavily uses iframes and lazy loading. Critical handling:
118
119**Iframe detection:**
120- After navigating, if the snapshot shows minimal content or an iframe structure, try:
121 ```
122 browser(action="snapshot", profile="chrome", compact=true, frame="main")
123 ```
124- Common iframe names/ids in SF: `"main"`, `"contentFrame"`, `"bizmuleApp"`, `"xCalApp"`
125- If `frame` doesn't work, take a full (non-compact) snapshot to see the full DOM tree
126
127**Lazy loading / SPA transitions:**
128- SuccessFactors is a Single Page Application. After navigation, content may take 3-5 seconds to render.
129- **Always snapshot twice** if the first snapshot shows loading indicators:
130 - Loading spinners: look for "Loading", "Please wait", spinner icons, progress bars
131 - Wait 3 seconds between snapshots
132 - If still loading after 2 retries (total ~9 seconds), inform user of slow load
133
134**Popup/Modal handling:**
135- SF sometimes shows popups ("What's New", cookie consent, tour prompts)
136- If a modal/dialog appears, look for "Close", "X", "Dismiss", "Got it", "Skip" buttons
137- Click to dismiss, then re-snapshot
138
139### Step 4: Scrape the Profile Page
140
141Once on the employee profile, take a detailed snapshot:
142
143```
144browser(action="snapshot", profile="chrome")
145```
146
147**SuccessFactors People Profile has these typical sections/cards:**
148
149#### Header / Banner Area
150Contains the most important info, always visible at top:
151- **Full Name** — Large heading text, usually `heading` level 1 or 2
152- **Job Title** — Text directly below the name
153- **Photo** — Avatar image (not scrapable as data, but confirms you're on the right profile)
154- **Employee ID** — Sometimes shown near name, sometimes in a subtitle like "ID: 12345"
155- **Quick action buttons** — Email, phone icons (these contain contact data)
156
157#### Info Cards / Sections (varies by company config)
158Each card has a header and key-value pairs. Common patterns:
159
160**"Personal Information" / "About" card:**
161- First Name, Last Name, Middle Name
162- Preferred Name / Display Name
163- Date of Birth (may be restricted)
164- Gender
165- Nationality
166- Marital Status
167
168**"Job Information" card:**
169- Job Title / Position Title
170- Job Code
171- Department / Division / Business Unit
172- Cost Center
173- Employment Type (Full-time, Part-time, etc.)
174- Employee Class / Employee Type
175- Regular/Temporary
176- Standard Hours
177- FTE (Full-Time Equivalent)
178- Pay Grade
179- Worker's Compensation Code
180
181**"Employment Details" / "Employment Information" card:**
182- Hire Date / Original Start Date
183- Seniority Date
184- Service Date
185- Last Date Worked
186- Termination Date (if applicable)
187- Employment Status (Active, Terminated, Leave, etc.)
188
189**"Compensation Information" card (may be restricted):**
190- Annual Salary / Base Pay
191- Pay Component
192- Currency
193- Compa-Ratio
194- Range Penetration
195
196**"Contact Information" card:**
197- Business Email
198- Personal Email
199- Business Phone
200- Mobile Phone
201- Home Phone
202- Business Address (Street, City, State, Zip, Country)
203- Home Address
204
205**"Organizational" / "Position" card:**
206- Manager Name (usually a clickable link)
207- Manager ID
208- Position
209- Direct Reports count
210- Legal Entity
211- Company Code
212
213**"Spot Profile" / "About Me" card:**
214- Bio / About Me text
215- Skills
216- Interests
217- Social accounts
218
219#### How to Extract Key-Value Pairs
220
221In the accessibility tree snapshot, profile data appears as:
222- **Labels** — `text` or `label` nodes with the field name (e.g., "Department")
223- **Values** — Adjacent `text`, `link`, or `statictext` nodes with the value (e.g., "Engineering")
224- Pattern: label followed by its value, often in a grid/table or definition list structure
225
226Example snapshot patterns:
227```
228text "Department"
229text "Engineering"
230text "Manager"
231link "Jane Smith"
232text "Location"
233text "Bangalore, India"
234text "Email"
235link "john.doe@company.com"
236```
237
238Scan sequentially and pair each label with its following value.
239
240### Step 5: Navigate Tabs for More Data
241
242SuccessFactors profiles often organize data into tabs or collapsible sections.
243
244**Common tab names:**
245- "Personal Information" / "Personal Info"
246- "Job Information" / "Job Info"
247- "Employment Information" / "Employment Details"
248- "Compensation Information" / "Compensation"
249- "Pay Components" / "Pay Details"
250- "Organizational Information" / "Organization"
251- "Contact Information"
252- "Documents"
253- "Performance History"
254- "Goal Plan"
255- "Time Off" / "Leave"
256
257**To navigate tabs:**
2581. Snapshot and identify tab elements (role: `tab`, `tablist`, or clickable links with these names)
2592. Click the tab you need:
260 ```
261 browser(action="act", profile="chrome", request={kind: "click", ref: "<tab_ref>"})
262 ```
2633. Wait 1-2 seconds for content to load
2644. Snapshot again and extract the new section's data
265
266**Collapsible sections:**
267- Some profiles use expandable/collapsible sections instead of tabs
268- Look for `button` elements with section names and expand/collapse indicators
269- Click to expand if collapsed, then snapshot
270
271### Step 6: Handle "Show More" / Pagination
272
273- Some sections show limited data with a "Show More", "View All", or "See More" link
274- Click it if present to reveal full data, then re-snapshot
275- Employment history or compensation history may have multiple records — scrape all visible
276
277### Step 7: Return Results
278
279Format results clearly, grouped by section:
280
281```
282═══ Employee Profile ═══
283
284👤 Basic Info
285 Name: John Doe
286 Employee ID: 12345
287 Job Title: Senior Developer
288 Department: Engineering
289
290📧 Contact
291 Email: john.doe@company.com
292 Phone: +91-9876543210
293 Location: Bangalore, India
294
295🏢 Organization
296 Manager: Jane Smith
297 Division: Technology
298 Business Unit: Product Development
299 Legal Entity: Company India Pvt Ltd
300
301📋 Employment
302 Hire Date: 2020-03-15
303 Status: Active
304 Type: Full-Time Regular
305```
306
307**Rules:**
308- Only include fields actually found on the page — NEVER fabricate data
309- If a field's value is empty or hidden ("*****", "Restricted"), report it as restricted
310- If the user only asked for a name, don't scrape every tab — just return what's visible in the header
311
312## Batch Mode
313
314For multiple employee IDs:
3151. Process one at a time sequentially
3162. After each profile, navigate to the next using Strategy A
3173. Collect all results
3184. Present as a formatted table at the end
3195. Note any IDs that failed
320
321## Configuration (Optional)
322
323User can add to `TOOLS.md`:
324```markdown
325### SuccessFactors
326- Base URL: https://yourcompany.successfactors.com
327- Default fields: name, email, department, manager
328```
329
330If configured, use the base URL directly (skip discovery). If default fields are specified, only scrape those.
331
332## Error Handling
333
334| Scenario | Detection | Action |
335|----------|-----------|--------|
336| Not logged in | Login form visible | Tell user to log in and re-attach relay |
337| Session expired | "Session Timeout" text | Same as above |
338| Employee not found | Search returns 0 results | Report clearly, suggest checking ID |
339| Access denied | "Unauthorized", "No access", "Insufficient privileges" | Report — user may lack permissions |
340| Profile restricted | Fields show "*****" or "Restricted" | Report which fields are restricted |
341| Page won't load | Loading spinner after 3 retries | Report timeout, suggest refreshing SF |
342| Multiple matches | Search returns >1 result | List matches with names/IDs, ask user to pick |
343| Wrong instance | URL doesn't match expected SF domain | Warn user, ask to confirm |
344
345## Important Notes
346
347- **NEVER use OData, REST API, or any programmatic endpoint.** Pure browser scraping only.
348- **Always use `profile="chrome"`** — never `profile="openclaw"` (need the user's auth session).
349- **Be patient** — SF can be slow. Always verify page state with snapshots before extracting.
350- **Don't navigate away** from SF without warning the user.
351- **Respect permissions** — if data is restricted/hidden in the UI, it's restricted for a reason. Don't try to circumvent.
352- **Screenshot fallback** — if snapshot (accessibility tree) doesn't capture visible text, use `browser(action="screenshot", profile="chrome")` to see the rendered page visually and extract from the image.